You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by dhaivat <dh...@gmail.com> on 2012/02/21 12:29:42 UTC
Fast Vector Highlighter Working for some records only
Hi
I am newbie to Solr and i am using Sorj Client to create index and query the
solr data.. When i am querying the data i want to use Highlight feature of
solr so i am using Fast Vector Highlighter to enable highlight on words.. I
found that it's working fine for some documents and for some document it's
returning any highlighted words even though the field of document contents
that word.. i am using the following parameters using solrj client :
query.add("hl","true");
query.add("hl.q",term);
query.add("hl.fl","contents");
query.add("hl.snippets","100");
query.add("hl.fragsize","100000");
query.add("hl.maxAnalyzedChars","100000");
query.add("hl.useFastVectorHighlighter","true");
query.add("hl.highlightMultiTerm","true");
query.add("hl.regex.slop","0.5");
query.add("hl.regex.pattern","[-\\w ,/\n\\\"']*");
query.setHighlightSimplePre("*");
query.setHighlightSimplePost("*");
My solrconfig is pretty strait forward haven't specified anything related to
highlighter there.
this is how my solrConfig looks like :
<config>
<updateHandler class="solr.DirectUpdateHandler2" />
<requestDispatcher handleSelect="true" >
<requestParsers enableRemoteStreaming="false"
multipartUploadLimitInKB="2048" />
</requestDispatcher>
<requestHandler name="standard" class="solr.StandardRequestHandler"
default="true" />
<requestHandler name="/update" class="solr.XmlUpdateRequestHandler" />
<requestHandler name="/admin/"
class="org.apache.solr.handler.admin.AdminHandlers" />
<admin>
<defaultQuery>solr</defaultQuery>
</admin>
</config>
i have also enabled the TermVectors,TermOffsets,TermPostions on Field on
which i am indexing
can anyone tell me where i am going wrong ?
thanks in advance
Dhaivat
--
View this message in context: http://lucene.472066.n3.nabble.com/Fast-Vector-Highlighter-Working-for-some-records-only-tp3763286p3763286.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Fast Vector Highlighter Working for some records only
Posted by dhaivat <dh...@gmail.com>.
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">.,!? 	 </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.
Re: Fast Vector Highlighter Working for some records only
Posted by dhaivat <dh...@gmail.com>.
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.
Re: Fast Vector Highlighter Working for some records only
Posted by Koji Sekiguchi <ko...@r.email.ne.jp>.
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.
>
Re: Fast Vector Highlighter Working for some records only
Posted by dhaivat <dh...@gmail.com>.
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.
Re: Fast Vector Highlighter Working for some records only
Posted by Koji Sekiguchi <ko...@r.email.ne.jp>.
(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/
Re: Fast Vector Highlighter Working for some records only
Posted by dhaivat <dh...@gmail.com>.
Koji Sekiguchi wrote
>
> (12/02/21 21:22), dhaivat wrote:
>> Hi Koji,
>>
>> Thanks for quick reply, i am using solr 1.4.1
>>
>
> Uh, you cannot use FVH on Solr 1.4.1. FVH is available Solr 3.1 or later.
> So your hl.useFastVectorHighlighter=true flag is ignored.
>
> koji
> --
> Query Log Visualizer for Apache Solr
> http://soleami.com/
>
Thanks for reply,
But can you please tell me why it's working for some documents and not for
other.
--
View this message in context: http://lucene.472066.n3.nabble.com/Fast-Vector-Highlighter-Working-for-some-records-only-tp3763286p3765458.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Fast Vector Highlighter Working for some records only
Posted by Koji Sekiguchi <ko...@r.email.ne.jp>.
(12/02/21 21:22), dhaivat wrote:
> Hi Koji,
>
> Thanks for quick reply, i am using solr 1.4.1
>
Uh, you cannot use FVH on Solr 1.4.1. FVH is available Solr 3.1 or later.
So your hl.useFastVectorHighlighter=true flag is ignored.
koji
--
Query Log Visualizer for Apache Solr
http://soleami.com/
Re: Fast Vector Highlighter Working for some records only
Posted by dhaivat <dh...@gmail.com>.
Hi Koji,
Thanks for quick reply, i am using solr 1.4.1
i am querying *"camera"*
here is the example of documents :
which matches the
<doc>
<id>70</id>
<category>Electronics/Cell Phones</category>
<thumbnail>/b/l/blackberry-8100-pearl-2.jpg</thumbnail>
<price>349.99</price>
<meta_description>BlackBerry 8100 Pearl sports a large 240 x 260 screen
that supports over 65,000 colors-- plenty of real estate to view your
e-mails, Web browser content, messaging sessions, and
attachments.</meta_description>
<contents>Silver</contents>
<url_path>blackberry-8100-pearl.html</url_path>
<contents>Like the BlackBerry 7105t, the BlackBerry 8100 Pearl is The
BlackBerry 8100 Pearl sports a large 240 x 260 screen that supports over
65,000 colors-- plenty of real estate to view your e-mails, Web browser
content, messaging sessions, and attachments. The venerable BlackBerry
trackwheel has been replaced on this model with an innovative four-way
trackball placed below the screen. On the rear of the handheld, you'll
find a 1.3-megapixel camera and a self portrait mirror. The handheld's
microSD memory card slot is located inside the device, behind the battery.
There's also a standard 2.5mm headset jack that can be used with the
included headset, as well as a mini-USB port for data
connectivity.</contents>
<contents>BlackBerry 8100 Pearl</contents>
<in_depth><ul> <ul class="disc"> <li> 1.3 mega
pixel camera to capture those special moments<br></li>
<li> MP3 player lets you listen to your favorite music on the
go<br></li> <li>Menu and escape keys on the front of the
device for easier access<br></li> <li> Bluetooth
technology lets you experience hands free and wire free
features<br></li> <li>Package Contents: phone,AC
adapter,software CD,headset,USB cable,sim- card,get started poster,reference
guide<br></li> </ul></in_depth>
</doc>
<doc>
<id>89</id>
<category>Electronics/Cameras/Accessories</category>
<thumbnail>/u/n/universal-camera-case-2.jpg</thumbnail>
<price>34.0</price>
<meta_description>Universal Camera Case</meta_description>
<contents>Green</contents>
<url_path>universal-camera-case.html</url_path>
<contents>A stylish digital camera demands stylish protection. This
leather carrying case will defend your camera from the dings and scratches
of travel and everyday use while looking smart all the time.</contents>
<contents>Universal Camera Case</contents>
<in_depth></in_depth>
</doc>
on above documents i am getting highlighting response on documentid = 89
and not for documentId = 70 even though there is word called "camera" in
document(id=70)..
I have field called
<field name="contents" type="custom_type" indexed="true" stored="true"
multiValued="true" termPositions="true" termVectors="true"
termOffsets="true"/>
for your information i am using custom analyser for indexing and querying.
Thanks
Dhaivat
Koji Sekiguchi wrote
>
> Dhaivat,
>
> Can you give us the concrete document that you are trying to search and
> make
> a highlight snippet? And what is your Solr version?
>
> koji
> --
> Query Log Visualizer for Apache Solr
> http://soleami.com/
>
> (12/02/21 20:29), dhaivat wrote:
>>
>> Hi
>>
>> I am newbie to Solr and i am using Sorj Client to create index and query
>> the
>> solr data.. When i am querying the data i want to use Highlight feature
>> of
>> solr so i am using Fast Vector Highlighter to enable highlight on words..
>> I
>> found that it's working fine for some documents and for some document
>> it's
>> returning any highlighted words even though the field of document
>> contents
>> that word.. i am using the following parameters using solrj client :
>>
>> query.add("hl","true");
>> query.add("hl.q",term);
>> query.add("hl.fl","contents");
>> query.add("hl.snippets","100");
>> query.add("hl.fragsize","100000");
>> query.add("hl.maxAnalyzedChars","100000");
>> query.add("hl.useFastVectorHighlighter","true");
>> query.add("hl.highlightMultiTerm","true");
>> query.add("hl.regex.slop","0.5");
>> query.add("hl.regex.pattern","[-\\w ,/\n\\\"']*");
>>
>> query.setHighlightSimplePre("*");
>> query.setHighlightSimplePost("*");
>>
>> My solrconfig is pretty strait forward haven't specified anything related
>> to
>> highlighter there.
>>
>> this is how my solrConfig looks like :
>>
>> <config>
>> <updateHandler class="solr.DirectUpdateHandler2" />
>>
>> <requestDispatcher handleSelect="true">
>> <requestParsers enableRemoteStreaming="false"
>> multipartUploadLimitInKB="2048" />
>> </requestDispatcher>
>>
>> <requestHandler name="standard" class="solr.StandardRequestHandler"
>> default="true" />
>> <requestHandler name="/update" class="solr.XmlUpdateRequestHandler" />
>> <requestHandler name="/admin/"
>> class="org.apache.solr.handler.admin.AdminHandlers" />
>>
>>
>>
>>
>>
>> <admin>
>> <defaultQuery>solr</defaultQuery>
>> </admin>
>>
>> </config>
>>
>> i have also enabled the TermVectors,TermOffsets,TermPostions on Field on
>> which i am indexing
>>
>>
>> can anyone tell me where i am going wrong ?
>>
>> thanks in advance
>>
>> Dhaivat
>>
>>
>>
>> --
>> View this message in context:
>> http://lucene.472066.n3.nabble.com/Fast-Vector-Highlighter-Working-for-some-records-only-tp3763286p3763286.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
>
Koji Sekiguchi wrote
>
> Dhaivat,
>
> Can you give us the concrete document that you are trying to search and
> make
> a highlight snippet? And what is your Solr version?
>
> koji
> --
> Query Log Visualizer for Apache Solr
> http://soleami.com/
>
> (12/02/21 20:29), dhaivat wrote:
>>
>> Hi
>>
>> I am newbie to Solr and i am using Sorj Client to create index and query
>> the
>> solr data.. When i am querying the data i want to use Highlight feature
>> of
>> solr so i am using Fast Vector Highlighter to enable highlight on words..
>> I
>> found that it's working fine for some documents and for some document
>> it's
>> returning any highlighted words even though the field of document
>> contents
>> that word.. i am using the following parameters using solrj client :
>>
>> query.add("hl","true");
>> query.add("hl.q",term);
>> query.add("hl.fl","contents");
>> query.add("hl.snippets","100");
>> query.add("hl.fragsize","100000");
>> query.add("hl.maxAnalyzedChars","100000");
>> query.add("hl.useFastVectorHighlighter","true");
>> query.add("hl.highlightMultiTerm","true");
>> query.add("hl.regex.slop","0.5");
>> query.add("hl.regex.pattern","[-\\w ,/\n\\\"']*");
>>
>> query.setHighlightSimplePre("*");
>> query.setHighlightSimplePost("*");
>>
>> My solrconfig is pretty strait forward haven't specified anything related
>> to
>> highlighter there.
>>
>> this is how my solrConfig looks like :
>>
>> <config>
>> <updateHandler class="solr.DirectUpdateHandler2" />
>>
>> <requestDispatcher handleSelect="true">
>> <requestParsers enableRemoteStreaming="false"
>> multipartUploadLimitInKB="2048" />
>> </requestDispatcher>
>>
>> <requestHandler name="standard" class="solr.StandardRequestHandler"
>> default="true" />
>> <requestHandler name="/update" class="solr.XmlUpdateRequestHandler" />
>> <requestHandler name="/admin/"
>> class="org.apache.solr.handler.admin.AdminHandlers" />
>>
>>
>>
>>
>>
>> <admin>
>> <defaultQuery>solr</defaultQuery>
>> </admin>
>>
>> </config>
>>
>> i have also enabled the TermVectors,TermOffsets,TermPostions on Field on
>> which i am indexing
>>
>>
>> can anyone tell me where i am going wrong ?
>>
>> thanks in advance
>>
>> Dhaivat
>>
>>
>>
>> --
>> View this message in context:
>> http://lucene.472066.n3.nabble.com/Fast-Vector-Highlighter-Working-for-some-records-only-tp3763286p3763286.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-tp3763286p3763393.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Fast Vector Highlighter Working for some records only
Posted by Koji Sekiguchi <ko...@r.email.ne.jp>.
Dhaivat,
Can you give us the concrete document that you are trying to search and make
a highlight snippet? And what is your Solr version?
koji
--
Query Log Visualizer for Apache Solr
http://soleami.com/
(12/02/21 20:29), dhaivat wrote:
>
> Hi
>
> I am newbie to Solr and i am using Sorj Client to create index and query the
> solr data.. When i am querying the data i want to use Highlight feature of
> solr so i am using Fast Vector Highlighter to enable highlight on words.. I
> found that it's working fine for some documents and for some document it's
> returning any highlighted words even though the field of document contents
> that word.. i am using the following parameters using solrj client :
>
> query.add("hl","true");
> query.add("hl.q",term);
> query.add("hl.fl","contents");
> query.add("hl.snippets","100");
> query.add("hl.fragsize","100000");
> query.add("hl.maxAnalyzedChars","100000");
> query.add("hl.useFastVectorHighlighter","true");
> query.add("hl.highlightMultiTerm","true");
> query.add("hl.regex.slop","0.5");
> query.add("hl.regex.pattern","[-\\w ,/\n\\\"']*");
>
> query.setHighlightSimplePre("*");
> query.setHighlightSimplePost("*");
>
> My solrconfig is pretty strait forward haven't specified anything related to
> highlighter there.
>
> this is how my solrConfig looks like :
>
> <config>
> <updateHandler class="solr.DirectUpdateHandler2" />
>
> <requestDispatcher handleSelect="true">
> <requestParsers enableRemoteStreaming="false"
> multipartUploadLimitInKB="2048" />
> </requestDispatcher>
>
> <requestHandler name="standard" class="solr.StandardRequestHandler"
> default="true" />
> <requestHandler name="/update" class="solr.XmlUpdateRequestHandler" />
> <requestHandler name="/admin/"
> class="org.apache.solr.handler.admin.AdminHandlers" />
>
>
>
>
>
> <admin>
> <defaultQuery>solr</defaultQuery>
> </admin>
>
> </config>
>
> i have also enabled the TermVectors,TermOffsets,TermPostions on Field on
> which i am indexing
>
>
> can anyone tell me where i am going wrong ?
>
> thanks in advance
>
> Dhaivat
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Fast-Vector-Highlighter-Working-for-some-records-only-tp3763286p3763286.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>