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 sivaprasad <si...@echidnainc.com> on 2010/11/15 19:04:23 UTC

Search results are not coming if the query contains()

Hi,
I have  the below analysis settings at index time and query time.
       <tokenizer class="solr.WhitespaceTokenizerFactory"/>
       <filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt"/>
       <filter class="solr.LowerCaseFilterFactory"/>
       <filter class="solr.EnglishPorterFilterFactory"
protected="protwords.txt"/>
       <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>


When i analyze the query using admin screen i got the below result.

hp      laserjet        2200    (h3978a)        mainten kit    
(h3978-60001)

But when i submit the query for searching i am not getting any results.But
with above query i have data in index.

What can be the problem?

-- 
View this message in context: http://lucene.472066.n3.nabble.com/Search-results-are-not-coming-if-the-query-contains-tp1906181p1906181.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Search results are not coming if the query contains()

Posted by sivaprasad <si...@echidnainc.com>.
I tried by escaping the special chars.Now it is working fine.

Thanks guys.
-- 
View this message in context: http://lucene.472066.n3.nabble.com/Search-results-are-not-coming-if-the-query-contains-tp1906181p1909589.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Search results are not coming if the query contains()

Posted by sivaprasad <si...@echidnainc.com>.
Hi 
 Here  is the query.

<str name="rawquerystring">
      hp laserjet 2200 (h3978a) mainten kit (h3978-60001)
</str>
<str name="querystring">
     hp laserjet 2200 (h3978a) mainten kit (h3978-60001)
</str>
<str name="parsedquery">
    +searchtext:hp +searchtext:laserjet +searchtext:2200 +searchtext:h3978a +searchtext:mainten +searchtext:kit +searchtext:h3978-60001
</str>
<str name="parsedquery_toString">
    +searchtext:hp +searchtext:laserjet +searchtext:2200 +searchtext:h3978a +searchtext:mainten +searchtext:kit +searchtext:h3978-60001
</str>

Why the "(" ,")" are trimming?

Regards,
Siva

-----Original Message-----
From: "Erick Erickson [via Lucene]" <ml...@n3.nabble.com>
Sent: Monday, November 15, 2010 5:29pm
To: "sivaprasad" <si...@echidnainc.com>
Subject: Re: Search results are not coming if the query contains()




I don't see the query you're submitting. Try submitting your query
with &debugQuery=on and pasting the results...

But first I'd try escaping the parenthesis in your query since
they are part of the query syntax...

Best
Erick

On Mon, Nov 15, 2010 at 1:04 PM, sivaprasad <si...@echidnainc.com>wrote:

>
> Hi,
> I have  the below analysis settings at index time and query time.
>       <tokenizer class="solr.WhitespaceTokenizerFactory"/>
>       <filter class="solr.StopFilterFactory" ignoreCase="true"
> words="stopwords.txt"/>
>       <filter class="solr.LowerCaseFilterFactory"/>
>       <filter class="solr.EnglishPorterFilterFactory"
> protected="protwords.txt"/>
>       <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
>
>
> When i analyze the query using admin screen i got the below result.
>
> hp      laserjet        2200    (h3978a)        mainten kit
> (h3978-60001)
>
> But when i submit the query for searching i am not getting any results.But
> with above query i have data in index.
>
> What can be the problem?
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Search-results-are-not-coming-if-the-query-contains-tp1906181p1906181.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>


______________________________________
View message @ http://lucene.472066.n3.nabble.com/Search-results-are-not-coming-if-the-query-contains-tp1906181p1907736.html
To start a new topic under Solr - User, email ml-node+472068-1030716887-225436@n3.nabble.com
To unsubscribe from Solr - User, click http://lucene.472066.n3.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_code&node=472068&code=c2l2YXByYXNhZC5qQGVjaGlkbmFpbmMuY29tfDQ3MjA2OHwtMjAyODMzMTY4OQ==



-- 
View this message in context: http://lucene.472066.n3.nabble.com/Search-results-are-not-coming-if-the-query-contains-tp1906181p1909318.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Search results are not coming if the query contains()

Posted by Erick Erickson <er...@gmail.com>.
I don't see the query you're submitting. Try submitting your query
with &debugQuery=on and pasting the results...

But first I'd try escaping the parenthesis in your query since
they are part of the query syntax...

Best
Erick

On Mon, Nov 15, 2010 at 1:04 PM, sivaprasad <si...@echidnainc.com>wrote:

>
> Hi,
> I have  the below analysis settings at index time and query time.
>       <tokenizer class="solr.WhitespaceTokenizerFactory"/>
>       <filter class="solr.StopFilterFactory" ignoreCase="true"
> words="stopwords.txt"/>
>       <filter class="solr.LowerCaseFilterFactory"/>
>       <filter class="solr.EnglishPorterFilterFactory"
> protected="protwords.txt"/>
>       <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
>
>
> When i analyze the query using admin screen i got the below result.
>
> hp      laserjet        2200    (h3978a)        mainten kit
> (h3978-60001)
>
> But when i submit the query for searching i am not getting any results.But
> with above query i have data in index.
>
> What can be the problem?
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Search-results-are-not-coming-if-the-query-contains-tp1906181p1906181.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>