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.