Package org.apache.solr.common.params

Examples of org.apache.solr.common.params.DefaultSolrParams


    SolrFragListBuilder {

  public FragListBuilder getFragListBuilder(SolrParams params) {
    numRequests++;
    if( defaults != null ) {
      params = new DefaultSolrParams( params, defaults );
    }
   
    return new org.apache.lucene.search.vectorhighlight.SingleFragListBuilder();
  }
View Full Code Here


{
  public Fragmenter getFragmenter(String fieldName, SolrParams params )
  {
    numRequests++;
    if( defaults != null ) {
      params = new DefaultSolrParams( params, defaults );
    }
   
    int fragsize = params.getFieldInt( fieldName, HighlightParams.FRAGSIZE, 100 );
    return (fragsize <= 0) ? new NullFragmenter() : new LuceneGapFragmenter(fragsize);
  }
View Full Code Here

  public Fragmenter getFragmenter(String fieldName, SolrParams params )
  {
    numRequests++;       
    if( defaults != null ) {
      params = new DefaultSolrParams( params, defaults );
    }
    int fragsize  = params.getFieldInt(   fieldName, HighlightParams.FRAGSIZE,  LuceneRegexFragmenter.DEFAULT_FRAGMENT_SIZE );
    int increment = params.getFieldInt(   fieldName, HighlightParams.INCREMENT, LuceneRegexFragmenter.DEFAULT_INCREMENT_GAP );
    float slop    = params.getFieldFloat( fieldName, HighlightParams.SLOP,      LuceneRegexFragmenter.DEFAULT_SLOP );
    int maxchars  = params.getFieldInt(   fieldName, HighlightParams.MAX_RE_CHARS, LuceneRegexFragmenter.DEFAULT_MAX_ANALYZED_CHARS );
View Full Code Here

{
  public Formatter getFormatter(String fieldName, SolrParams params )
  {
    numRequests++;
    if( defaults != null ) {
      params = new DefaultSolrParams( params, defaults );
    }
   
    return new SimpleHTMLFormatter(
        params.getFieldParam(fieldName, HighlightParams.SIMPLE_PRE,  "<em>" ),
        params.getFieldParam(fieldName, HighlightParams.SIMPLE_POST, "</em>"));
View Full Code Here

  protected QParser altQParser;


  @Override
  public Query parse() throws ParseException {
    SolrParams solrParams = localParams == null ? params : new DefaultSolrParams(localParams, params);
    queryFields = SolrPluginUtils.parseFieldBoosts(solrParams.getParams(DisMaxParams.QF));
    if (0 == queryFields.size()) {
      queryFields.put(req.getSchema().getDefaultSearchFieldName(), 1.0f);
    }
   
View Full Code Here

   * @return An appropriate {@link org.apache.lucene.search.vectorhighlight.FragmentsBuilder}.
   */
  public FragmentsBuilder getFragmentsBuilder(SolrParams params, BoundaryScanner bs) {
    numRequests++;
    if( defaults != null ) {
      params = new DefaultSolrParams( params, defaults );
    }
    return getFragmentsBuilder( params, getPreTags( params, null ), getPostTags( params, null ), bs );
  }
View Full Code Here

    return getTags( params, HighlightParams.TAG_POST, fieldName, DEFAULT_POST_TAGS );
  }
 
  private String[] getTags( SolrParams params, String paramName, String fieldName, String def ){
    if( defaults != null ) {
      params = new DefaultSolrParams( params, defaults );
    }
    String value = null;
    if( fieldName == null )
      value = params.get( paramName, def );
    else
View Full Code Here

  public static void setDefaults(SolrQueryRequest req, SolrParams defaults,
                                 SolrParams appends, SolrParams invariants) {
   
      SolrParams p = req.getParams();
      if (defaults != null) {
        p = new DefaultSolrParams(p,defaults);
      }
      if (appends != null) {
        p = new AppendedSolrParams(p,appends);
      }
      if (invariants != null) {
        p = new DefaultSolrParams(invariants,p);
      }
      req.setParams(p);
  }
View Full Code Here

 
  private static SolrHighlighterX HIGHLIGHTER = new SolrHighlighterX();
 
   /** Combine request parameters with highlighting defaults. */
   static SolrParams getParams(SolrQueryRequest request) {
      return new DefaultSolrParams(request.getParams(), DEFAULTS);
   }
View Full Code Here

    SolrInfoMBean, NamedListInitializedPlugin {

  public BoundaryScanner getBoundaryScanner(String fieldName, SolrParams params){
    numRequests++;
    if( defaults != null ) {
      params = new DefaultSolrParams( params, defaults );
    }
    return get(fieldName, params);
  }
View Full Code Here

TOP

Related Classes of org.apache.solr.common.params.DefaultSolrParams

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.