Hi Koji

 i am using solr 3.5 and i want to highlight the multivalued field, when i
supply single value for the multi field value at that highlighter is working
fine. but when i am indexing multiple values for field and try to highlight
that field at that time i am getting following error with Fast Vector
Highlighter 

java.lang.StringIndexOutOfBoundsException: String index out of range: -1099

i have set following parameter using solrj


                        query.add("hl.q",term);
                        query.add("hl.fl","contents");
                        query.add("hl","true");
                        
                        
                        query.add("hl.useFastVectorHighlighter","true");
                        query.add("hl.snippets","100");
                        query.add("hl.fragsize","70000");
                        query.add("hl.maxAnalyzedChars","70000");

can you please tell me the cause of this error ?

Thanks in advance
Dhaivat

                        



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-tp3763286p3771933.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to