Hi Koji,

Thanks for your guidance. i have looked into anlysis page of solr and it's
working fine.but still it's not working fine for few documents. 

here is configuration for highlighter i am using,i have specefied this in
solrconfig.xml, please can you tell me what should i change to highlighter
to work for all documents. for your information i am not using any kind of
filter for custom field, i am just using my custom tokeniser.. 


  <searchComponent class="solr.HighlightComponent" name="highlight">
    <highlighting>
      
      
      <fragmenter name="gap" 
                  default="true"
                  class="solr.highlight.GapFragmenter">
        <lst name="defaults">
          
                        <int name="hl.snippets">1000</int>
                        <int name="hl.fragsize">70000</int>
                  
                        <int name="hl.maxAnalyzedChars">70000</int>
                
                </lst>
      </fragmenter>

      

        <fragmenter name="regex" 
class="org.apache.solr.highlight.RegexFragmenter">
    <lst name="defaults">
      
      <int name="hl.fragsize">70</int>
      
      <float name="hl.regex.slop">0.5</float>
      
      <str name="hl.regex.pattern">[-\w ,/\n\"']{20,200}</str>
    </lst>
   </fragmenter>
                
     

      
      <formatter name="html" 
                 default="true"
                 class="solr.highlight.HtmlFormatter">
        <lst name="defaults">
          <str name="hl.simple.pre"></str>
          <str name="hl.simple.post"></str>
        </lst>
      </formatter>

      
      <encoder name="html" 
               class="solr.highlight.HtmlEncoder" />

      
      <fragListBuilder name="simple" 
                       default="true"
                       class="solr.highlight.SimpleFragListBuilder"/>

      
      <fragListBuilder name="single" 
                       class="solr.highlight.SingleFragListBuilder"/>

      
      <fragmentsBuilder name="default" 
                        default="true"
                        class="solr.highlight.ScoreOrderFragmentsBuilder">
        
      </fragmentsBuilder>

      
      <fragmentsBuilder name="colored" 
                        class="solr.highlight.ScoreOrderFragmentsBuilder">
        <lst name="defaults">
          <str name="hl.tag.pre"></str>
          <str name="hl.tag.post"></str>
        </lst>
      </fragmentsBuilder>
      
      <boundaryScanner name="default" 
                       default="true"
                       class="solr.highlight.SimpleBoundaryScanner">
        <lst name="defaults">
          <str name="hl.bs.maxScan">10</str>
          <str name="hl.bs.chars">.,!? &#9;&#10;&#13;</str>
        </lst>
      </boundaryScanner>
      
      <boundaryScanner name="breakIterator" 
                       class="solr.highlight.BreakIteratorBoundaryScanner">
        <lst name="defaults">
          
          <str name="hl.bs.type">WORD</str>
          
          
          <str name="hl.bs.language">en</str>
          <str name="hl.bs.country">US</str>
        </lst>
      </boundaryScanner>
    </highlighting>
  </searchComponent>

 



Koji Sekiguchi wrote
> 
> Hi dhaivat,
> 
> I think you may want to use analysis.jsp:
> 
> http://localhost:8983/solr/admin/analysis.jsp
> 
> Go to the URL and look into how your custom tokenizer produces tokens,
> and compare with the output of Solr's inbuilt tokenizer.
> 
> koji
> -- 
> Query Log Visualizer for Apache Solr
> http://soleami.com/
> 
> 
> (12/02/22 21:35), dhaivat wrote:
>>
>> Koji Sekiguchi wrote
>>>
>>> (12/02/22 11:58), dhaivat wrote:
>>>> Thanks for reply,
>>>>
>>>> But can you please tell me why it's working for some documents and not
>>>> for
>>>> other.
>>>
>>> As Solr 1.4.1 cannot recognize hl.useFastVectorHighlighter flag, Solr
>>> just
>>> ignore it, but due to hl=true is there, Solr tries to create highlight
>>> snippets
>>> by using (existing; traditional; I mean not FVH) Highlighter.
>>> Highlighter (including FVH) cannot produce snippets sometime for some
>>> reasons,
>>> you can use hl.alternateField parameter.
>>>
>>> http://wiki.apache.org/solr/HighlightingParameters#hl.alternateField
>>>
>>> koji
>>> --
>>> Query Log Visualizer for Apache Solr
>>> http://soleami.com/
>>>
>>
>> Thank you so much explanation,
>>
>> I have updated my solr version and using 3.5, Could you please tell me
>> when
>> i am using custom Tokenizer on the field,so do i need to make any changes
>> related Solr highlighter.
>>
>> here is my custom analyser
>>
>>   <fieldType name="custom_text" class="solr.TextField"
>> positionIncrementGap="100">
>>        <analyzer type="index">
>>          <tokenizer
>> class="ns.solr.analyser.CustomIndexTokeniserFactory"/>
>>        </analyzer>
>>      <analyzer type="query">
>>      <tokenizer class="ns.solr.analyser.CustomSearcherTokeniserFactory"/>
>>              
>>      </analyzer>
>>      </fieldType>
>>
>> here is the field info:
>>
>> <field name="contents" type="custom_text" indexed="true" stored="true"
>> multiValued="true" termPositions="true"  termVectors="true"
>> termOffsets="true"/>
>>
>> i am creating tokens using my custom analyser and when i am trying to use
>> highlighter it's not working properly for contents field.. but when i
>> tried
>> to use Solr inbuilt tokeniser i am finding the word highlighted for
>> particular query.. Please can you help me out with this ?
>>
>>
>> Thanks in advance
>> Dhaivat
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://lucene.472066.n3.nabble.com/Fast-Vector-Highlighter-Working-for-some-records-only-tp3763286p3766335.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
> 


--
View this message in context: 
http://lucene.472066.n3.nabble.com/Fast-Vector-Highlighter-Working-for-some-records-only-tp3763286p3769006.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to