Java 类org.apache.lucene.search.highlight.NullFragmenter 实例源码

项目:search    文件:RegexFragmenter.java   
@Override
public Fragmenter getFragmenter(String fieldName, SolrParams params )
{ 
  numRequests++;
  params = SolrParams.wrapDefaults(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 );
  String rawpat = params.getFieldParam( fieldName, HighlightParams.PATTERN,   LuceneRegexFragmenter.DEFAULT_PATTERN_RAW );

  Pattern p = rawpat == defaultPatternRaw ? defaultPattern : Pattern.compile(rawpat);

  if( fragsize <= 0 ) {
    return new NullFragmenter();
  }

  return new LuceneRegexFragmenter( fragsize, increment, slop, maxchars, p );
}
项目:NYBC    文件:RegexFragmenter.java   
@Override
public Fragmenter getFragmenter(String fieldName, SolrParams params )
{ 
  numRequests++;
  params = SolrParams.wrapDefaults(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 );
  String rawpat = params.getFieldParam( fieldName, HighlightParams.PATTERN,   LuceneRegexFragmenter.DEFAULT_PATTERN_RAW );

  Pattern p = rawpat == defaultPatternRaw ? defaultPattern : Pattern.compile(rawpat);

  if( fragsize <= 0 ) {
    return new NullFragmenter();
  }

  return new LuceneRegexFragmenter( fragsize, increment, slop, maxchars, p );
}
项目:search-core    文件:RegexFragmenter.java   
@Override
public Fragmenter getFragmenter(String fieldName, SolrParams params )
{ 
  numRequests++;
  params = SolrParams.wrapDefaults(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 );
  String rawpat = params.getFieldParam( fieldName, HighlightParams.PATTERN,   LuceneRegexFragmenter.DEFAULT_PATTERN_RAW );

  Pattern p = rawpat == defaultPatternRaw ? defaultPattern : Pattern.compile(rawpat);

  if( fragsize <= 0 ) {
    return new NullFragmenter();
  }

  return new LuceneRegexFragmenter( fragsize, increment, slop, maxchars, p );
}
项目:read-open-source-code    文件:RegexFragmenter.java   
@Override
public Fragmenter getFragmenter(String fieldName, SolrParams params )
{ 
  numRequests++;
  params = SolrParams.wrapDefaults(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 );
  String rawpat = params.getFieldParam( fieldName, HighlightParams.PATTERN,   LuceneRegexFragmenter.DEFAULT_PATTERN_RAW );

  Pattern p = rawpat == defaultPatternRaw ? defaultPattern : Pattern.compile(rawpat);

  if( fragsize <= 0 ) {
    return new NullFragmenter();
  }

  return new LuceneRegexFragmenter( fragsize, increment, slop, maxchars, p );
}
项目:read-open-source-code    文件:RegexFragmenter.java   
@Override
public Fragmenter getFragmenter(String fieldName, SolrParams params )
{ 
  numRequests++;
  params = SolrParams.wrapDefaults(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 );
  String rawpat = params.getFieldParam( fieldName, HighlightParams.PATTERN,   LuceneRegexFragmenter.DEFAULT_PATTERN_RAW );

  Pattern p = rawpat == defaultPatternRaw ? defaultPattern : Pattern.compile(rawpat);

  if( fragsize <= 0 ) {
    return new NullFragmenter();
  }

  return new LuceneRegexFragmenter( fragsize, increment, slop, maxchars, p );
}
项目:search    文件:GapFragmenter.java   
@Override
public Fragmenter getFragmenter(String fieldName, SolrParams params )
{
  numRequests++;
  params = SolrParams.wrapDefaults(params, defaults);

  int fragsize = params.getFieldInt( fieldName, HighlightParams.FRAGSIZE, 100 );
  return (fragsize <= 0) ? new NullFragmenter() : new LuceneGapFragmenter(fragsize);
}
项目:NYBC    文件:GapFragmenter.java   
@Override
public Fragmenter getFragmenter(String fieldName, SolrParams params )
{
  numRequests++;
  params = SolrParams.wrapDefaults(params, defaults);

  int fragsize = params.getFieldInt( fieldName, HighlightParams.FRAGSIZE, 100 );
  return (fragsize <= 0) ? new NullFragmenter() : new LuceneGapFragmenter(fragsize);
}
项目:search-core    文件:GapFragmenter.java   
@Override
public Fragmenter getFragmenter(String fieldName, SolrParams params )
{
  numRequests++;
  params = SolrParams.wrapDefaults(params, defaults);

  int fragsize = params.getFieldInt( fieldName, HighlightParams.FRAGSIZE, 100 );
  return (fragsize <= 0) ? new NullFragmenter() : new LuceneGapFragmenter(fragsize);
}
项目:read-open-source-code    文件:GapFragmenter.java   
@Override
public Fragmenter getFragmenter(String fieldName, SolrParams params )
{
  numRequests++;
  params = SolrParams.wrapDefaults(params, defaults);

  int fragsize = params.getFieldInt( fieldName, HighlightParams.FRAGSIZE, 100 );
  return (fragsize <= 0) ? new NullFragmenter() : new LuceneGapFragmenter(fragsize);
}
项目:read-open-source-code    文件:GapFragmenter.java   
@Override
public Fragmenter getFragmenter(String fieldName, SolrParams params )
{
  numRequests++;
  params = SolrParams.wrapDefaults(params, defaults);

  int fragsize = params.getFieldInt( fieldName, HighlightParams.FRAGSIZE, 100 );
  return (fragsize <= 0) ? new NullFragmenter() : new LuceneGapFragmenter(fragsize);
}