>Can you give me the following info to reproduce the problem?

>* field data
all fields are plain english text analyzed with the same analyzer

>* query string (created via DismaxQueryParser)
(field1:tablet^13.0 | field2:tablet^3.0 | field3:tablet^5.0 | field4:tablet
| field5:tablet^200.0 | field6:tablet | field7:tablet^9.0 | field8:tablet)

>* field definition in schema.xml
I am trying to highlight field5 wich, as the others looks like:
<field name="field5"                type="text"              indexed="true"
stored="true"/>
And text type is configured as:
    <fieldType name="text" class="solr.TextField" positionIncrementGap="100"
omitNorms="true" termVectors="true" termPositions="true" termOffsets="true"
>
      <analyzer type="index">
        <tokenizer class="solr.StandardTokenizerFactory"/>
        <filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt"/>
        
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.ISOLatin1AccentFilterFactory"/>
        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
      </analyzer>      
      <analyzer type="query">
        <tokenizer class="solr.StandardTokenizerFactory"/>
        <filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt/>
        
         <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.ISOLatin1AccentFilterFactory"/>
        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
      </analyzer>
    </fieldType>

> Hmm, I should check it. Can you open a JIRA issue?
I have commented it on the current jira but if you want I can open a new one
https://issues.apache.org/jira/browse/SOLR-1268

Thanks



Koji Sekiguchi-2 wrote:
> 
> Can you give me the following info to reproduce the problem?
> 
> * field data
> * query string
> * field definition in schema.xml
> 
>  > **I also have noticed that using snippet fragment size to 0 (wich in 
> normal
>  > highlight returns the whole field highlighted) gives an error.
> 
> Hmm, I should check it. Can you open a JIRA issue?
> 
> Thank you,
> 
> Koji
> 
> -- 
> http://www.rondhuit.com/en/
> 
> 
> Marc Sturlese wrote:
>> I am having some trouble to make it work. I am debuging the code and I
>> see
>> when de  FastVectorHighlighter constructor is created, the parameters
>> that
>> it recieves are ok
>>
>>     // get FastVectorHighlighter instance out of the processing loop
>>     FastVectorHighlighter fvh = new FastVectorHighlighter(
>>         // FVH cannot process hl.usePhraseHighlighter parameter per-field
>> basis
>>         params.getBool( HighlightParams.USE_PHRASE_HIGHLIGHTER, true ),
>>         // FVH cannot process hl.requireFieldMatch parameter per-field
>> basis
>>         params.getBool( HighlightParams.FIELD_MATCH, false ),
>>         getFragListBuilder( params ),
>>         getFragmentsBuilder( params ) );
>>
>> The query here is ok aswell:
>> FieldQuery fieldQuery = fvh.getFieldQuery( query );
>>
>> But I can't see what's in fieldQuery (just a memory path and don't know
>> to
>> do someting similar to toString())
>>
>> The problem I see is in:
>>
>>         String[] snippets = highlighter.getBestFragments( fieldQuery,
>> req.getSearcher().getReader(), docId, fieldName,
>>                 params.getFieldInt( fieldName, HighlightParams.FRAGSIZE,
>> 100
>> ),
>>                 params.getFieldInt( fieldName, HighlightParams.SNIPPETS,
>> 1 )
>> );
>>
>> snippets ends up with an empty array so it jumps to:
>> alternateField( docSummaries, params, doc, fieldName );
>>
>> In solrconfig.xml I added:
>>    <fragListBuilder name="simple"
>> class="org.apache.solr.highlight.SimpleFragListBuilder" default="false"/>
>>    <fragmentsBuilder name="colored"
>> class="org.apache.solr.highlight.MultiColoredScoreOrderFragmentsBuilder"
>> default="false"/>
>>
>> Maybe I am missing something... any idea?
>> Using the doHighlightingByHighlighter highlight works perfect.
>>
>> **I also have noticed that using snippet fragment size to 0 (wich in
>> normal
>> highlight returns the whole field highlighted) gives an error.
>>
>>
>>
>> Koji Sekiguchi-2 wrote:
>>   
>>> Marc Sturlese wrote:
>>>     
>>>> How do I activate FastVectorHighlighter in trunk? Wich of those params
>>>> sets
>>>> it up?
>>>>    <!-- Configure the standard fragListBuilder -->
>>>>    <fragListBuilder name="simple"
>>>> class="org.apache.solr.highlight.SimpleFragListBuilder"
>>>> default="true"/>
>>>>
>>>>    <!-- Configure the standard fragmentsBuilder -->
>>>>    <fragmentsBuilder name="colored"
>>>> class="org.apache.solr.highlight.MultiColoredScoreOrderFragmentsBuilder"
>>>> default="true"/>
>>>>
>>>>    <fragmentsBuilder name="scoreOrder"
>>>> class="org.apache.solr.highlight.ScoreOrderFragmentsBuilder"
>>>> default="true"/>
>>>>
>>>> Thanks in advance.
>>>>   
>>>>       
>>> You do not need to activate it. DefaultSolrHighlighter, which is the
>>> "default" SolrHighlighter impl, calls automatically uses FVH when you
>>> specify field names that are termVectors, termPositions and termOffsets
>>> are true through hl.fl parameter. If you want to use "multi colored" tag
>>> feature, you need to specify MultiColored*FragmentsBuilder in 
>>> solrconfig.xml.
>>>
>>> Koji
>>>
>>> -- 
>>> http://www.rondhuit.com/en/
>>>
>>>
>>>
>>>     
>>
>>   
> 
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/configure-FastVectorHihglighter-in-trunk-tp27319976p27353089.html
Sent from the Solr - Dev mailing list archive at Nabble.com.

Reply via email to