Re: Some solrconfig.xml attributes being ignored
Hi Erik, Thanks a lot for looking into this, it's greatly appreciated. Mark On Tue, Dec 16, 2008 at 2:51 AM, Erik Hatcher e...@ehatchersolutions.comwrote: Mark, Looked at the code to discern this... A fragmenter isn't responsible for the number of snippets - the higher level SolrHighlighter is the component that uses that parameter. So yes, it must be specified at the request handler level, not the fragmenter configuration. Erik On Dec 15, 2008, at 7:35 PM, Mark Ferguson wrote: It seems like maybe the fragmenter parameters just don't get displayed with echoParams=all set. It may only display as far as the request handler's parameters. The reason I think this is because I tried increasing hl.fragsize to 1000 and the results were returned correctly (much larger snippets), so I know it was read correctly. I moved hl.snippets into the requestHandler config instead of the fragmenter, and this seems to have solved the problem. However, I'm uneasy with this solution because I don't know why it wasn't being read correctly when setting it inside the fragmenter. Mark On Mon, Dec 15, 2008 at 5:08 PM, Mark Ferguson mark.a.fergu...@gmail.com wrote: Thanks for this tip, it's very helpful. Indeed, it looks like none of the highlighting parameters are being included. It's using the correct request handler and hl is set to true, but none of the highlighting parameters from solrconfig.xml are in the parameter list. Here is my query: http://localhost:8080/solr1/select?rows=50hl=truefl=url,urlmd5,page_title,scoreechoParams=allq=java Here are the settings for the request handler and the highlighter: requestHandler name=dismax class=solr.SearchHandler default=true lst name=defaults str name=defTypedismax/str float name=tie0.01/float str name=qfbody_text^1.0 page_title^1.6 meta_desc^1.3/str str name=q.alt*:*/str str name=hl.flbody_text page_title meta_desc/str str name=f.page_title.hl.fragsize0/str str name=f.meta_desc.hl.fragsize0/str str name=hl.fragmenterregex/str /lst /requestHandler highlighting fragmenter name=regex class=org.apache.solr.highlight.RegexFragmenter default=true lst name=defaults str name=hl.snippets3/str str name=hl.fragsize100/str str name=hl.regex.slop0.5/str str name=hl.regex.pattern\w[-\w ,/\n\']{50,150}/str /lst /fragmenter /highlighting And here is the param list returned to me: lst name=params str name=echoParamsall/str str name=tie0.01/str str name=hl.fragmenterregex/str str name=f.page_title.hl.fragsize0/str str name=qfbody_text^1.0 page_title^1.6 meta_desc^1.3/str str name=f.meta_desc.hl.fragsize0/str str name=q.alt*:*/str str name=hl.flpage_title,body_text/str str name=defTypedismax/str str name=echoParamsall/str str name=flurl,urlmd5,page_title,score/str str name=qjava/str str name=hltrue/str str name=rows50/str /lst So it seems like everything is working except for the highlighter. I should mention that when I enter a bogus fragmenter as a parameter (e.g. hl.fragmenter=bogus), it returns a 400 error that the fragmenter cannot be found, so the config file _is_ finding the regex fragmenter. It just doesn't seem to actually be including its parameters... Any ideas are appreciated, thanks again for the help. Mark On Mon, Dec 15, 2008 at 4:23 PM, Yonik Seeley ysee...@gmail.com wrote: Try adding echoParams=all to your query to verify the params that the solr request handler is getting. -Yonik On Mon, Dec 15, 2008 at 6:10 PM, Mark Ferguson mark.a.fergu...@gmail.com wrote: Hello, In my solrconfig.xml file I am setting the attribute hl.snippets to 3. When I perform a search, it returns only a single snippet for each highlighted field. However, when I set the hl.snippets field manually as a search parameter, I get up to 3 highlighted snippets. This is the configuration that I am using to set the highlighted parameters: fragmenter name=regex class=org.apache.solr.highlight.RegexFragmenter default=true lst name=defaults str name=hl.snippets3/str str name=hl.fragsize100/str str name=hl.regex.slop0.5/str str name=hl.regex.pattern\w[-\w ,/\n\']{50,150}/str /lst /fragmenter I tried setting hl.fragmenter=regex as a parameter as well, to be sure that it was using the correct one, and the result set is the same. Any ideas what could be causing this attribute not to be read? It has me concerned that other attributes are being ignored as well. Thanks, Mark Ferguson
Re: Some solrconfig.xml attributes being ignored
Mark, Looked at the code to discern this... A fragmenter isn't responsible for the number of snippets - the higher level SolrHighlighter is the component that uses that parameter. So yes, it must be specified at the request handler level, not the fragmenter configuration. Erik On Dec 15, 2008, at 7:35 PM, Mark Ferguson wrote: It seems like maybe the fragmenter parameters just don't get displayed with echoParams=all set. It may only display as far as the request handler's parameters. The reason I think this is because I tried increasing hl.fragsize to 1000 and the results were returned correctly (much larger snippets), so I know it was read correctly. I moved hl.snippets into the requestHandler config instead of the fragmenter, and this seems to have solved the problem. However, I'm uneasy with this solution because I don't know why it wasn't being read correctly when setting it inside the fragmenter. Mark On Mon, Dec 15, 2008 at 5:08 PM, Mark Ferguson mark.a.fergu...@gmail.com wrote: Thanks for this tip, it's very helpful. Indeed, it looks like none of the highlighting parameters are being included. It's using the correct request handler and hl is set to true, but none of the highlighting parameters from solrconfig.xml are in the parameter list. Here is my query: http://localhost:8080/solr1/select?rows=50hl=truefl=url,urlmd5,page_title,scoreechoParams=allq=java Here are the settings for the request handler and the highlighter: requestHandler name=dismax class=solr.SearchHandler default=true lst name=defaults str name=defTypedismax/str float name=tie0.01/float str name=qfbody_text^1.0 page_title^1.6 meta_desc^1.3/str str name=q.alt*:*/str str name=hl.flbody_text page_title meta_desc/str str name=f.page_title.hl.fragsize0/str str name=f.meta_desc.hl.fragsize0/str str name=hl.fragmenterregex/str /lst /requestHandler highlighting fragmenter name=regex class=org.apache.solr.highlight.RegexFragmenter default=true lst name=defaults str name=hl.snippets3/str str name=hl.fragsize100/str str name=hl.regex.slop0.5/str str name=hl.regex.pattern\w[-\w ,/\n\']{50,150}/str /lst /fragmenter /highlighting And here is the param list returned to me: lst name=params str name=echoParamsall/str str name=tie0.01/str str name=hl.fragmenterregex/str str name=f.page_title.hl.fragsize0/str str name=qfbody_text^1.0 page_title^1.6 meta_desc^1.3/str str name=f.meta_desc.hl.fragsize0/str str name=q.alt*:*/str str name=hl.flpage_title,body_text/str str name=defTypedismax/str str name=echoParamsall/str str name=flurl,urlmd5,page_title,score/str str name=qjava/str str name=hltrue/str str name=rows50/str /lst So it seems like everything is working except for the highlighter. I should mention that when I enter a bogus fragmenter as a parameter (e.g. hl.fragmenter=bogus), it returns a 400 error that the fragmenter cannot be found, so the config file _is_ finding the regex fragmenter. It just doesn't seem to actually be including its parameters... Any ideas are appreciated, thanks again for the help. Mark On Mon, Dec 15, 2008 at 4:23 PM, Yonik Seeley ysee...@gmail.com wrote: Try adding echoParams=all to your query to verify the params that the solr request handler is getting. -Yonik On Mon, Dec 15, 2008 at 6:10 PM, Mark Ferguson mark.a.fergu...@gmail.com wrote: Hello, In my solrconfig.xml file I am setting the attribute hl.snippets to 3. When I perform a search, it returns only a single snippet for each highlighted field. However, when I set the hl.snippets field manually as a search parameter, I get up to 3 highlighted snippets. This is the configuration that I am using to set the highlighted parameters: fragmenter name=regex class=org.apache.solr.highlight.RegexFragmenter default=true lst name=defaults str name=hl.snippets3/str str name=hl.fragsize100/str str name=hl.regex.slop0.5/str str name=hl.regex.pattern\w[-\w ,/\n\']{50,150}/str /lst /fragmenter I tried setting hl.fragmenter=regex as a parameter as well, to be sure that it was using the correct one, and the result set is the same. Any ideas what could be causing this attribute not to be read? It has me concerned that other attributes are being ignored as well. Thanks, Mark Ferguson
Some solrconfig.xml attributes being ignored
Hello, In my solrconfig.xml file I am setting the attribute hl.snippets to 3. When I perform a search, it returns only a single snippet for each highlighted field. However, when I set the hl.snippets field manually as a search parameter, I get up to 3 highlighted snippets. This is the configuration that I am using to set the highlighted parameters: fragmenter name=regex class=org.apache.solr.highlight.RegexFragmenter default=true lst name=defaults str name=hl.snippets3/str str name=hl.fragsize100/str str name=hl.regex.slop0.5/str str name=hl.regex.pattern\w[-\w ,/\n\']{50,150}/str /lst /fragmenter I tried setting hl.fragmenter=regex as a parameter as well, to be sure that it was using the correct one, and the result set is the same. Any ideas what could be causing this attribute not to be read? It has me concerned that other attributes are being ignored as well. Thanks, Mark Ferguson
Re: Some solrconfig.xml attributes being ignored
Try adding echoParams=all to your query to verify the params that the solr request handler is getting. -Yonik On Mon, Dec 15, 2008 at 6:10 PM, Mark Ferguson mark.a.fergu...@gmail.com wrote: Hello, In my solrconfig.xml file I am setting the attribute hl.snippets to 3. When I perform a search, it returns only a single snippet for each highlighted field. However, when I set the hl.snippets field manually as a search parameter, I get up to 3 highlighted snippets. This is the configuration that I am using to set the highlighted parameters: fragmenter name=regex class=org.apache.solr.highlight.RegexFragmenter default=true lst name=defaults str name=hl.snippets3/str str name=hl.fragsize100/str str name=hl.regex.slop0.5/str str name=hl.regex.pattern\w[-\w ,/\n\']{50,150}/str /lst /fragmenter I tried setting hl.fragmenter=regex as a parameter as well, to be sure that it was using the correct one, and the result set is the same. Any ideas what could be causing this attribute not to be read? It has me concerned that other attributes are being ignored as well. Thanks, Mark Ferguson
Re: Some solrconfig.xml attributes being ignored
Thanks for this tip, it's very helpful. Indeed, it looks like none of the highlighting parameters are being included. It's using the correct request handler and hl is set to true, but none of the highlighting parameters from solrconfig.xml are in the parameter list. Here is my query: http://localhost:8080/solr1/select?rows=50hl=truefl=url,urlmd5,page_title,scoreechoParams=allq=java Here are the settings for the request handler and the highlighter: requestHandler name=dismax class=solr.SearchHandler default=true lst name=defaults str name=defTypedismax/str float name=tie0.01/float str name=qfbody_text^1.0 page_title^1.6 meta_desc^1.3/str str name=q.alt*:*/str str name=hl.flbody_text page_title meta_desc/str str name=f.page_title.hl.fragsize0/str str name=f.meta_desc.hl.fragsize0/str str name=hl.fragmenterregex/str /lst /requestHandler highlighting fragmenter name=regex class=org.apache.solr.highlight.RegexFragmenter default=true lst name=defaults str name=hl.snippets3/str str name=hl.fragsize100/str str name=hl.regex.slop0.5/str str name=hl.regex.pattern\w[-\w ,/\n\']{50,150}/str /lst /fragmenter /highlighting And here is the param list returned to me: lst name=params str name=echoParamsall/str str name=tie0.01/str str name=hl.fragmenterregex/str str name=f.page_title.hl.fragsize0/str str name=qfbody_text^1.0 page_title^1.6 meta_desc^1.3/str str name=f.meta_desc.hl.fragsize0/str str name=q.alt*:*/str str name=hl.flpage_title,body_text/str str name=defTypedismax/str str name=echoParamsall/str str name=flurl,urlmd5,page_title,score/str str name=qjava/str str name=hltrue/str str name=rows50/str /lst So it seems like everything is working except for the highlighter. I should mention that when I enter a bogus fragmenter as a parameter (e.g. hl.fragmenter=bogus), it returns a 400 error that the fragmenter cannot be found, so the config file _is_ finding the regex fragmenter. It just doesn't seem to actually be including its parameters... Any ideas are appreciated, thanks again for the help. Mark On Mon, Dec 15, 2008 at 4:23 PM, Yonik Seeley ysee...@gmail.com wrote: Try adding echoParams=all to your query to verify the params that the solr request handler is getting. -Yonik On Mon, Dec 15, 2008 at 6:10 PM, Mark Ferguson mark.a.fergu...@gmail.com wrote: Hello, In my solrconfig.xml file I am setting the attribute hl.snippets to 3. When I perform a search, it returns only a single snippet for each highlighted field. However, when I set the hl.snippets field manually as a search parameter, I get up to 3 highlighted snippets. This is the configuration that I am using to set the highlighted parameters: fragmenter name=regex class=org.apache.solr.highlight.RegexFragmenter default=true lst name=defaults str name=hl.snippets3/str str name=hl.fragsize100/str str name=hl.regex.slop0.5/str str name=hl.regex.pattern\w[-\w ,/\n\']{50,150}/str /lst /fragmenter I tried setting hl.fragmenter=regex as a parameter as well, to be sure that it was using the correct one, and the result set is the same. Any ideas what could be causing this attribute not to be read? It has me concerned that other attributes are being ignored as well. Thanks, Mark Ferguson
Re: Some solrconfig.xml attributes being ignored
It seems like maybe the fragmenter parameters just don't get displayed with echoParams=all set. It may only display as far as the request handler's parameters. The reason I think this is because I tried increasing hl.fragsize to 1000 and the results were returned correctly (much larger snippets), so I know it was read correctly. I moved hl.snippets into the requestHandler config instead of the fragmenter, and this seems to have solved the problem. However, I'm uneasy with this solution because I don't know why it wasn't being read correctly when setting it inside the fragmenter. Mark On Mon, Dec 15, 2008 at 5:08 PM, Mark Ferguson mark.a.fergu...@gmail.comwrote: Thanks for this tip, it's very helpful. Indeed, it looks like none of the highlighting parameters are being included. It's using the correct request handler and hl is set to true, but none of the highlighting parameters from solrconfig.xml are in the parameter list. Here is my query: http://localhost:8080/solr1/select?rows=50hl=truefl=url,urlmd5,page_title,scoreechoParams=allq=java Here are the settings for the request handler and the highlighter: requestHandler name=dismax class=solr.SearchHandler default=true lst name=defaults str name=defTypedismax/str float name=tie0.01/float str name=qfbody_text^1.0 page_title^1.6 meta_desc^1.3/str str name=q.alt*:*/str str name=hl.flbody_text page_title meta_desc/str str name=f.page_title.hl.fragsize0/str str name=f.meta_desc.hl.fragsize0/str str name=hl.fragmenterregex/str /lst /requestHandler highlighting fragmenter name=regex class=org.apache.solr.highlight.RegexFragmenter default=true lst name=defaults str name=hl.snippets3/str str name=hl.fragsize100/str str name=hl.regex.slop0.5/str str name=hl.regex.pattern\w[-\w ,/\n\']{50,150}/str /lst /fragmenter /highlighting And here is the param list returned to me: lst name=params str name=echoParamsall/str str name=tie0.01/str str name=hl.fragmenterregex/str str name=f.page_title.hl.fragsize0/str str name=qfbody_text^1.0 page_title^1.6 meta_desc^1.3/str str name=f.meta_desc.hl.fragsize0/str str name=q.alt*:*/str str name=hl.flpage_title,body_text/str str name=defTypedismax/str str name=echoParamsall/str str name=flurl,urlmd5,page_title,score/str str name=qjava/str str name=hltrue/str str name=rows50/str /lst So it seems like everything is working except for the highlighter. I should mention that when I enter a bogus fragmenter as a parameter (e.g. hl.fragmenter=bogus), it returns a 400 error that the fragmenter cannot be found, so the config file _is_ finding the regex fragmenter. It just doesn't seem to actually be including its parameters... Any ideas are appreciated, thanks again for the help. Mark On Mon, Dec 15, 2008 at 4:23 PM, Yonik Seeley ysee...@gmail.com wrote: Try adding echoParams=all to your query to verify the params that the solr request handler is getting. -Yonik On Mon, Dec 15, 2008 at 6:10 PM, Mark Ferguson mark.a.fergu...@gmail.com wrote: Hello, In my solrconfig.xml file I am setting the attribute hl.snippets to 3. When I perform a search, it returns only a single snippet for each highlighted field. However, when I set the hl.snippets field manually as a search parameter, I get up to 3 highlighted snippets. This is the configuration that I am using to set the highlighted parameters: fragmenter name=regex class=org.apache.solr.highlight.RegexFragmenter default=true lst name=defaults str name=hl.snippets3/str str name=hl.fragsize100/str str name=hl.regex.slop0.5/str str name=hl.regex.pattern\w[-\w ,/\n\']{50,150}/str /lst /fragmenter I tried setting hl.fragmenter=regex as a parameter as well, to be sure that it was using the correct one, and the result set is the same. Any ideas what could be causing this attribute not to be read? It has me concerned that other attributes are being ignored as well. Thanks, Mark Ferguson