You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by Marc Sturlese <ma...@gmail.com> on 2010/01/26 10:33:30 UTC

configure FastVectorHihglighter in trunk

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.
-- 
View this message in context: http://old.nabble.com/configure-FastVectorHihglighter-in-trunk-tp27319976p27319976.html
Sent from the Solr - Dev mailing list archive at Nabble.com.


Re: configure FastVectorHihglighter in trunk

Posted by Koji Sekiguchi <ko...@r.email.ne.jp>.
Koji Sekiguchi wrote:
> Marc Sturlese wrote:
>> I think it fails when using defType dismax with more than one field.
>> In the default Solr example doesn't work eighter. I have added the 
>> default
>> .xml files with docs and using standard requestHandler it works. It 
>> doesn't
>> when using the dismax requestHandler
>>
>>   
> Ah, I see. FVH doesn't support DisjunctionMaxQuery. I should
> be awake to it when you indicated that you used dismax at the
> previous mail. Sorry about that.
> I'll open an issue in Lucene and try to write a patch.
>
> Thank you,
>
> Koji
>
Opened:
https://issues.apache.org/jira/browse/LUCENE-2243

Koji

-- 
http://www.rondhuit.com/en/


Re: configure FastVectorHihglighter in trunk

Posted by Koji Sekiguchi <ko...@r.email.ne.jp>.
Marc Sturlese wrote:
> I think it fails when using defType dismax with more than one field.
> In the default Solr example doesn't work eighter. I have added the default
> .xml files with docs and using standard requestHandler it works. It doesn't
> when using the dismax requestHandler
>
>   
Ah, I see. FVH doesn't support DisjunctionMaxQuery. I should
be awake to it when you indicated that you used dismax at the
previous mail. Sorry about that.
I'll open an issue in Lucene and try to write a patch.

Thank you,

Koji

-- 
http://www.rondhuit.com/en/


Re: configure FastVectorHihglighter in trunk

Posted by Marc Sturlese <ma...@gmail.com>.
I think it fails when using defType dismax with more than one field.
In the default Solr example doesn't work eighter. I have added the default
.xml files with docs and using standard requestHandler it works. It doesn't
when using the dismax requestHandler



Marc Sturlese wrote:
> 
> I have tried with many diferent documents without exit. An example is (as
> I said it's just normal english text):
> 
> NEW LISTING..IN POPULAR CREEKSTONE ESTATES! AT THE END OF A BEAUTIFUL
> CULDESAC. COVERED VERANDA OVERLOOKS PRIVATE BACKYARD. MASTER ON MAIN.
> GOURMET CHEF'S KITCHEN Additional Information: Amenities: Clubhouse, Lake,
> Playground, Pool, Sidewalks, Street Lights, Neighborhood Assoc., Basement:
> Daylight, Entrance Inside, Entrance Outside, Finished Rooms, Full,
> Construction: Brick, Cooling: Ceiling Fan, Zoned/Dual, Energy Features:
> Clock Thermostat, Double Pane/Thermo, Roof Vent Fans, Water Heater-Gas,
> Exterior Features: Garden Area, Sprinkler System, Listing courtesy of:
> Re/Max Town & Country, Directions: 400 NORTH TO EXIT 13. TURN RIGHT ONTO
> 141/PEACHTREE PKWY. CREEKSTONE ESTATES IS APPROX 3 MILES DOWN ON RIGHT. AT
> STOP SIGN TAKE 1ST RIGHT ON CREEKTREE LANE, Square Footage: Square footage
> information in the MLS is sometimes inaccurate. Therefore we do not
> display this on the web site. Instead please inquire with your sales
> associate regarding more specific details of properties you are interested
> in Features: Garden Area, Sprinkler System, Listing courtesy of: Re/Max
> Town & Country, Directions: 400 NORTH TO EXIT 13. TURN RIGHT ONTO
> 141/PEACHTREE PKWY. CREEKSTONE ESTATES IS APPROX 3 MILES DOWN ON RIGHT. AT
> STOP SIGN TAKE 1ST RIGHT ON CREEKTREE LANE, Square Footage: Square footage
> information in the MLS is sometimes inaccurate. Therefore we do not
> display this on the web site. Instead please inquire with your sales
> associate regarding more specific details of properties you are interested
> in Features: Garden Area, Sprinkler System, Listing courtesy of: Re/Max
> Town & Country, Directions: 400 NORTH TO EXIT 13. TURN RIGHT ONTO
> 141/PEACHTREE PKWY. CREEKSTONE ESTATES IS APPROX 3 MILES DOWN ON RIGHT. AT
> STOP SIGN TAKE 1ST RIGHT ON CREEKTREE LANE, Square Footage: Square footage
> information in the MLS is sometimes inaccurate. Therefore we do not
> display this on the web site. Instead please inquire with your sales
> associate regarding more specific details of properties you are interested
> in Features: Garden Area, Sprinkler System, Listing courtesy of: Re/Max
> Town & Country, Directions: 400 NORTH TO EXIT 13. TURN RIGHT ONTO
> 141/PEACHTREE PKWY. CREEKSTONE ESTATES IS APPROX 3 MILES DOWN ON RIGHT. AT
> STOP SIGN TAKE 1ST RIGHT ON CREEKTREE LANE, Square Footage: Square footage
> information in the MLS is sometimes inaccurate. Therefore we do not
> display this on the web site. Instead please inquire with your sales
> associate regarding more specific details of properties you are interested
> in Features: Garden Area, Sprinkler System, Listing courtesy of: Re/Max
> Town & Country, Directions: 400 NORTH TO EXIT 13. TURN RIGHT ONTO
> 141/PEACHTREE PKWY. CREEKSTONE ESTATES IS APPROX 3 MILES DOWN ON RIGHT. AT
> STOP SIGN TAKE 1ST RIGHT ON CREEKTREE LANE, Square Footage: Square footage
> information in the MLS is sometimes inaccurate. Therefore we do not
> display this on the web site. Instead please inquire with your sales
> associate regarding more specific details of properties you are interested
> in Features: Garden Area, Sprinkler System, Listing courtesy of: Re/Max
> Town & Country, Directions: 400 NORTH TO EXIT 13. TURN RIGHT ONTO
> 141/PEACHTREE PKWY. CREEKSTONE ESTATES IS APPROX 3 MILES DOWN ON RIGHT. AT
> STOP SIGN TAKE 1ST RIGHT ON CREEKTREE LANE, Square Footage: Square footage
> information in the MLS is sometimes inaccurate. Therefore we do not
> display this on the web site. Instead please inquire with your sales
> associate regarding more specific details of properties you are interested
> in Features: Garden Area, Sprinkler System, Listing courtesy of: Re/Max
> Town & Country, Directions: 400 NORTH TO EXIT 13. TURN RIGHT ONTO
> 141/PEACHTREE PKWY. CREEKSTONE ESTATES IS APPROX 3 MILES DOWN ON RIGHT. AT
> STOP SIGN TAKE 1ST RIGHT ON CREEKTREE LANE, Square Footage: Square footage
> information in the MLS is sometimes inaccurate. Therefore we do not
> display this on the web site. Instead please inquire with your sales
> associate regarding more specific details of properties you are interested
> in
> 
> 
> Koji Sekiguchi-2 wrote:
>> 
>> Marc Sturlese wrote:
>>>> Can you give me the following info to reproduce the problem?
>>>>     
>>>> * field data
>>>>     
>>> all fields are plain english text analyzed with the same analyzer
>>>
>>>   
>> I meant I'd like to know your concrete data...
>> 
>> Koji
>> 
>> -- 
>> http://www.rondhuit.com/en/
>> 
>> 
>> 
>> 
>> 
> 
> 

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


Re: configure FastVectorHihglighter in trunk

Posted by Marc Sturlese <ma...@gmail.com>.
I have tried with many diferent documents without exit. An example is (as I
said it's just normal english text):

NEW LISTING..IN POPULAR CREEKSTONE ESTATES! AT THE END OF A BEAUTIFUL
CULDESAC. COVERED VERANDA OVERLOOKS PRIVATE BACKYARD. MASTER ON MAIN.
GOURMET CHEF'S KITCHEN Additional Information: Amenities: Clubhouse, Lake,
Playground, Pool, Sidewalks, Street Lights, Neighborhood Assoc., Basement:
Daylight, Entrance Inside, Entrance Outside, Finished Rooms, Full,
Construction: Brick, Cooling: Ceiling Fan, Zoned/Dual, Energy Features:
Clock Thermostat, Double Pane/Thermo, Roof Vent Fans, Water Heater-Gas,
Exterior Features: Garden Area, Sprinkler System, Listing courtesy of:
Re/Max Town & Country, Directions: 400 NORTH TO EXIT 13. TURN RIGHT ONTO
141/PEACHTREE PKWY. CREEKSTONE ESTATES IS APPROX 3 MILES DOWN ON RIGHT. AT
STOP SIGN TAKE 1ST RIGHT ON CREEKTREE LANE, Square Footage: Square footage
information in the MLS is sometimes inaccurate. Therefore we do not display
this on the web site. Instead please inquire with your sales associate
regarding more specific details of properties you are interested in
Features: Garden Area, Sprinkler System, Listing courtesy of: Re/Max Town &
Country, Directions: 400 NORTH TO EXIT 13. TURN RIGHT ONTO 141/PEACHTREE
PKWY. CREEKSTONE ESTATES IS APPROX 3 MILES DOWN ON RIGHT. AT STOP SIGN TAKE
1ST RIGHT ON CREEKTREE LANE, Square Footage: Square footage information in
the MLS is sometimes inaccurate. Therefore we do not display this on the web
site. Instead please inquire with your sales associate regarding more
specific details of properties you are interested in Features: Garden Area,
Sprinkler System, Listing courtesy of: Re/Max Town & Country, Directions:
400 NORTH TO EXIT 13. TURN RIGHT ONTO 141/PEACHTREE PKWY. CREEKSTONE ESTATES
IS APPROX 3 MILES DOWN ON RIGHT. AT STOP SIGN TAKE 1ST RIGHT ON CREEKTREE
LANE, Square Footage: Square footage information in the MLS is sometimes
inaccurate. Therefore we do not display this on the web site. Instead please
inquire with your sales associate regarding more specific details of
properties you are interested in Features: Garden Area, Sprinkler System,
Listing courtesy of: Re/Max Town & Country, Directions: 400 NORTH TO EXIT
13. TURN RIGHT ONTO 141/PEACHTREE PKWY. CREEKSTONE ESTATES IS APPROX 3 MILES
DOWN ON RIGHT. AT STOP SIGN TAKE 1ST RIGHT ON CREEKTREE LANE, Square
Footage: Square footage information in the MLS is sometimes inaccurate.
Therefore we do not display this on the web site. Instead please inquire
with your sales associate regarding more specific details of properties you
are interested in Features: Garden Area, Sprinkler System, Listing courtesy
of: Re/Max Town & Country, Directions: 400 NORTH TO EXIT 13. TURN RIGHT ONTO
141/PEACHTREE PKWY. CREEKSTONE ESTATES IS APPROX 3 MILES DOWN ON RIGHT. AT
STOP SIGN TAKE 1ST RIGHT ON CREEKTREE LANE, Square Footage: Square footage
information in the MLS is sometimes inaccurate. Therefore we do not display
this on the web site. Instead please inquire with your sales associate
regarding more specific details of properties you are interested in
Features: Garden Area, Sprinkler System, Listing courtesy of: Re/Max Town &
Country, Directions: 400 NORTH TO EXIT 13. TURN RIGHT ONTO 141/PEACHTREE
PKWY. CREEKSTONE ESTATES IS APPROX 3 MILES DOWN ON RIGHT. AT STOP SIGN TAKE
1ST RIGHT ON CREEKTREE LANE, Square Footage: Square footage information in
the MLS is sometimes inaccurate. Therefore we do not display this on the web
site. Instead please inquire with your sales associate regarding more
specific details of properties you are interested in Features: Garden Area,
Sprinkler System, Listing courtesy of: Re/Max Town & Country, Directions:
400 NORTH TO EXIT 13. TURN RIGHT ONTO 141/PEACHTREE PKWY. CREEKSTONE ESTATES
IS APPROX 3 MILES DOWN ON RIGHT. AT STOP SIGN TAKE 1ST RIGHT ON CREEKTREE
LANE, Square Footage: Square footage information in the MLS is sometimes
inaccurate. Therefore we do not display this on the web site. Instead please
inquire with your sales associate regarding more specific details of
properties you are interested in


Koji Sekiguchi-2 wrote:
> 
> Marc Sturlese wrote:
>>> Can you give me the following info to reproduce the problem?
>>>     
>>> * field data
>>>     
>> all fields are plain english text analyzed with the same analyzer
>>
>>   
> I meant I'd like to know your concrete data...
> 
> Koji
> 
> -- 
> http://www.rondhuit.com/en/
> 
> 
> 
> 
> 

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


Re: configure FastVectorHihglighter in trunk

Posted by Koji Sekiguchi <ko...@r.email.ne.jp>.
Marc Sturlese wrote:
>> Can you give me the following info to reproduce the problem?
>>     
>> * field data
>>     
> all fields are plain english text analyzed with the same analyzer
>
>   
I meant I'd like to know your concrete data...

Koji

-- 
http://www.rondhuit.com/en/




Re: configure FastVectorHihglighter in trunk

Posted by Marc Sturlese <ma...@gmail.com>.
>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.


Re: configure FastVectorHihglighter in trunk

Posted by Koji Sekiguchi <ko...@r.email.ne.jp>.
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/
>>
>>
>>
>>     
>
>   



Re: configure FastVectorHihglighter in trunk

Posted by Marc Sturlese <ma...@gmail.com>.
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-tp27319976p27344139.html
Sent from the Solr - Dev mailing list archive at Nabble.com.


Re: configure FastVectorHihglighter in trunk

Posted by Koji Sekiguchi <ko...@r.email.ne.jp>.
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/