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 Tanner Postert <ta...@gmail.com> on 2011/02/15 21:21:21 UTC
Any way to get back search query with parsed out stop words
I am trying to see if there is a way to get back the resulting search'd
query to solr excluding the stopwords. Right now when I search for: "the
year in review" i can see in the debug that the parsed query contains: text:"?
year ? review" but that information is mixed in with all the parsed boosting
queries and isn't easily accessible via that XML (and would require me to
always pass debugQuery=true to my production queries.
I am trying to only get back the natural searched terms so I can highlight
them in the returned search results. I know that solr has built in
highlighting capability, but I can't use it because some of the fields
contain HTML themselves and I need to strip it all out when I display the
search results.
right now, if I pass the full searched phrase to the highlighter it looks a
little strange having every occurrence of "the" or "and" highlighted, so I'd
like to only highlight the non-stopwords if I could.
any thoughts or ideas would be appreciated
Re: Any way to get back search query with parsed out stop words
Posted by Tanner Postert <ta...@gmail.com>.
ok, I will look at using that filter factory on my content.
But I was also looking at the stop filter number so I could adjust my mm
parameter based on the number of non-stopwords in the search parameter so I
don't run into the dismax stopword issue. any way around that other than
using a very low mm?
On Tue, Feb 15, 2011 at 1:45 PM, Ahmet Arslan <io...@yahoo.com> wrote:
> > I am trying to only get back the natural searched terms so
> > I can highlight
> > them in the returned search results. I know that solr has
> > built in
> > highlighting capability, but I can't use it because some of
> > the fields
> > contain HTML themselves and I need to strip it all out when
> > I display the
> > search results.
>
> I would stick with the solr's highlighting. If you strip html codes with a
> solr.HTMLStripCharFilterFactory, you can highlight html fields without
> problem.
>
>
>
>
>
>
Re: Any way to get back search query with parsed out stop words
Posted by Ahmet Arslan <io...@yahoo.com>.
> I am trying to only get back the natural searched terms so
> I can highlight
> them in the returned search results. I know that solr has
> built in
> highlighting capability, but I can't use it because some of
> the fields
> contain HTML themselves and I need to strip it all out when
> I display the
> search results.
I would stick with the solr's highlighting. If you strip html codes with a solr.HTMLStripCharFilterFactory, you can highlight html fields without problem.