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 Sangeetha <sa...@gmail.com> on 2012/12/27 09:45:50 UTC
search with spaces
Hi,
I have a text field with value O O Jaane Jaane. When i search with *q=Jaane
Jaane* it is giving the results. But if i give *q=O O Jaane Jaane* it is not
working? What could be the reason?
Thanks,
Sangeetha
--
View this message in context: http://lucene.472066.n3.nabble.com/search-with-spaces-tp4029265.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: search with spaces
Posted by Chandan Tamrakar <ch...@nepasoft.com>.
Which Analyzer is being used in the field that was indexed ?
May be you can use solradmin to analyze and see how is your index
thanks
On Thu, Dec 27, 2012 at 2:30 PM, Sangeetha <sa...@gmail.com> wrote:
> Hi,
>
> I have a text field with value O O Jaane Jaane. When i search with *q=Jaane
> Jaane* it is giving the results. But if i give *q=O O Jaane Jaane* it is
> not
> working? What could be the reason?
>
> Thanks,
> Sangeetha
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/search-with-spaces-tp4029265.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
--
Chandan Tamrakar
*
*
Re: search with spaces
Posted by Jack Krupansky <ja...@basetechnology.com>.
That's &debugQuery=true or &debug=query.
-- Jack Krupansky
-----Original Message-----
From: Otis Gospodnetic
Sent: Thursday, December 27, 2012 10:56 AM
To: solr-user@lucene.apache.org
Subject: Re: search with spaces
Hi,
Add &debugQuery=query to your search requests. That will point you in the
right direction.
Otis
--
Performance Monitoring - http://sematext.com/spm/index.html
Search Analytics - http://sematext.com/search-analytics/index.html
On Thu, Dec 27, 2012 at 3:45 AM, Sangeetha <sa...@gmail.com> wrote:
> Hi,
>
> I have a text field with value O O Jaane Jaane. When i search with
> *q=Jaane
> Jaane* it is giving the results. But if i give *q=O O Jaane Jaane* it is
> not
> working? What could be the reason?
>
> Thanks,
> Sangeetha
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/search-with-spaces-tp4029265.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
Re: search with spaces
Posted by Jack Krupansky <ja...@basetechnology.com>.
It would help if we had a clear description of what the analyzer is SUPPOSED
to do, since it seems to do a lot of stuff that may or may not make sense.
In other words, what is the original problem the analzer is trying to
solve - in detail?
-- Jack Krupansky
-----Original Message-----
From: Ahmet Arslan
Sent: Monday, December 31, 2012 11:58 AM
To: solr-user@lucene.apache.org
Subject: Re: search with spaces
hi Sangeetha,
Your field type definition is somehow weird.
Since you use solr.LowerCaseTokenizerFactory" you don't need
LowerCaseFilterFactory after that.
Your tokenizer keeps only letters. Number and other thing do not survive
after tokenization. It is letter tokenizer under the hood.
NGramFilterFactory combined with stem filter may cause something like that:
implementation => will produce men at index time. stemmer will convert it
into man. And query man will match implementation. Just an example.
Just a guess may be one length words cannot survive ngram filter? Or you
have O in stopwords.txt?
analysis admin page shows step by step all analysis phases. You can enter
your example document and query there and see if there is a match or not.
It will show you what happens to your "0" "O"
Other factor is which query parser are you using? dismax lucene etc.
analysis page does not perform actual query parsing. output of
&debugQuery=on is critical.
Try set setting &q.op=OR (for lucene query parser) or &mm=1 (dismax query
parser)
--- On Mon, 12/31/12, Sangeetha <sa...@gmail.com> wrote:
> From: Sangeetha <sa...@gmail.com>
> Subject: Re: search with spaces
> To: solr-user@lucene.apache.org
> Date: Monday, December 31, 2012, 7:55 AM
> Hi,
> I am not using custom solr plugin.
>
> I am not getting the results. There is no exception.
>
> Here is my fieldType definition,
>
> <fieldType name="text" class="solr.TextField"
> positionIncrementGap="100">
> <analyzer
> type="index">
> <tokenizer
> class="solr.LowerCaseTokenizerFactory" />
> <filter
> class="solr.StopFilterFactory" ignoreCase="true"
> words="stopwords.txt" />
>
> <filter
> class="solr.LowerCaseFilterFactory" />
> <filter
> class="solr.KeywordMarkerFilterFactory"
> protected="protwords.txt" />
> <filter
> class="solr.NGramFilterFactory" minGramSize="2"
> maxGramSize="15" side="front"/>
> <filter
> class="solr.NGramFilterFactory" minGramSize="2"
> maxGramSize="15" side="back"/>
> <filter
> class="solr.PorterStemFilterFactory" />
> <filter
> class="solr.RemoveDuplicatesTokenFilterFactory" />
> </analyzer>
> <analyzer
> type="query">
> <tokenizer
> class="solr.LowerCaseTokenizerFactory" />
> <filter
> class="solr.SynonymFilterFactory"
> synonyms="synonyms.txt" ignoreCase="true" expand="true"
> />
> <filter
> class="solr.StopFilterFactory" ignoreCase="true"
> words="stopwords.txt" />
>
> <filter
> class="solr.LowerCaseFilterFactory" />
> <filter
> class="solr.KeywordMarkerFilterFactory"
> protected="protwords.txt" />
> <filter
> class="solr.PorterStemFilterFactory" />
> <filter
> class="solr.RemoveDuplicatesTokenFilterFactory"/>
> </analyzer>
> </fieldType>
>
> Thanks,
> Sangeetha
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/search-with-spaces-tp4029265p4029755.html
> Sent from the Solr - User mailing list archive at
> Nabble.com.
>
Re: search with spaces
Posted by Ahmet Arslan <io...@yahoo.com>.
hi Sangeetha,
Your field type definition is somehow weird.
Since you use solr.LowerCaseTokenizerFactory" you don't need LowerCaseFilterFactory after that.
Your tokenizer keeps only letters. Number and other thing do not survive after tokenization. It is letter tokenizer under the hood.
NGramFilterFactory combined with stem filter may cause something like that:
implementation => will produce men at index time. stemmer will convert it into man. And query man will match implementation. Just an example.
Just a guess may be one length words cannot survive ngram filter? Or you have O in stopwords.txt?
analysis admin page shows step by step all analysis phases. You can enter your example document and query there and see if there is a match or not. It will show you what happens to your "0" "O"
Other factor is which query parser are you using? dismax lucene etc.
analysis page does not perform actual query parsing. output of &debugQuery=on is critical.
Try set setting &q.op=OR (for lucene query parser) or &mm=1 (dismax query parser)
--- On Mon, 12/31/12, Sangeetha <sa...@gmail.com> wrote:
> From: Sangeetha <sa...@gmail.com>
> Subject: Re: search with spaces
> To: solr-user@lucene.apache.org
> Date: Monday, December 31, 2012, 7:55 AM
> Hi,
> I am not using custom solr plugin.
>
> I am not getting the results. There is no exception.
>
> Here is my fieldType definition,
>
> <fieldType name="text" class="solr.TextField"
> positionIncrementGap="100">
> <analyzer
> type="index">
> <tokenizer
> class="solr.LowerCaseTokenizerFactory" />
> <filter
> class="solr.StopFilterFactory" ignoreCase="true"
> words="stopwords.txt" />
>
> <filter
> class="solr.LowerCaseFilterFactory" />
> <filter
> class="solr.KeywordMarkerFilterFactory"
> protected="protwords.txt" />
> <filter
> class="solr.NGramFilterFactory" minGramSize="2"
> maxGramSize="15" side="front"/>
> <filter
> class="solr.NGramFilterFactory" minGramSize="2"
> maxGramSize="15" side="back"/>
> <filter
> class="solr.PorterStemFilterFactory" />
> <filter
> class="solr.RemoveDuplicatesTokenFilterFactory" />
> </analyzer>
> <analyzer
> type="query">
> <tokenizer
> class="solr.LowerCaseTokenizerFactory" />
> <filter
> class="solr.SynonymFilterFactory"
> synonyms="synonyms.txt" ignoreCase="true" expand="true"
> />
> <filter
> class="solr.StopFilterFactory" ignoreCase="true"
> words="stopwords.txt" />
>
> <filter
> class="solr.LowerCaseFilterFactory" />
> <filter
> class="solr.KeywordMarkerFilterFactory"
> protected="protwords.txt" />
> <filter
> class="solr.PorterStemFilterFactory" />
> <filter
> class="solr.RemoveDuplicatesTokenFilterFactory"/>
> </analyzer>
> </fieldType>
>
> Thanks,
> Sangeetha
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/search-with-spaces-tp4029265p4029755.html
> Sent from the Solr - User mailing list archive at
> Nabble.com.
>
Re: search with spaces
Posted by Sangeetha <sa...@gmail.com>.
Hi,
I am not using custom solr plugin.
I am not getting the results. There is no exception.
Here is my fieldType definition,
<fieldType name="text" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.LowerCaseTokenizerFactory" />
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" />
<filter class="solr.LowerCaseFilterFactory" />
<filter class="solr.KeywordMarkerFilterFactory"
protected="protwords.txt" />
<filter class="solr.NGramFilterFactory" minGramSize="2"
maxGramSize="15" side="front"/>
<filter class="solr.NGramFilterFactory" minGramSize="2"
maxGramSize="15" side="back"/>
<filter class="solr.PorterStemFilterFactory" />
<filter class="solr.RemoveDuplicatesTokenFilterFactory" />
</analyzer>
<analyzer type="query">
<tokenizer class="solr.LowerCaseTokenizerFactory" />
<filter class="solr.SynonymFilterFactory"
synonyms="synonyms.txt" ignoreCase="true" expand="true" />
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" />
<filter class="solr.LowerCaseFilterFactory" />
<filter class="solr.KeywordMarkerFilterFactory"
protected="protwords.txt" />
<filter class="solr.PorterStemFilterFactory" />
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
</fieldType>
Thanks,
Sangeetha
--
View this message in context: http://lucene.472066.n3.nabble.com/search-with-spaces-tp4029265p4029755.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: search with spaces
Posted by Ahmet Arslan <io...@yahoo.com>.
Hi Sangeetha,
Do you use any custom solr plugin?
Can you paste your fieldType definition?
By saying "it is not working" you mean it is not returning expected results? Or you get an exception?
--- On Fri, 12/28/12, Sangeetha <sa...@gmail.com> wrote:
> From: Sangeetha <sa...@gmail.com>
> Subject: Re: search with spaces
> To: solr-user@lucene.apache.org
> Date: Friday, December 28, 2012, 12:33 PM
> please ignore the previous mail.
> debugQuery=true not query.
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/search-with-spaces-tp4029265p4029410.html
> Sent from the Solr - User mailing list archive at
> Nabble.com.
>
Re: search with spaces
Posted by Sangeetha <sa...@gmail.com>.
please ignore the previous mail. debugQuery=true not query.
--
View this message in context: http://lucene.472066.n3.nabble.com/search-with-spaces-tp4029265p4029410.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: search with spaces
Posted by Sangeetha <sa...@gmail.com>.
when i gave debugQuery=query, i got the following error,
<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader">
<int name="status">400</int>
<int name="QTime">0</int>
<lst name="params">
<str name="debugQuery">query</str>
<str name="q">O O Jaane Jaane</str>
</lst>
</lst>
<lst name="error">
<str name="msg">invalid boolean value: query</str>
<int name="code">400</int>
</lst>
</response>
--
View this message in context: http://lucene.472066.n3.nabble.com/search-with-spaces-tp4029265p4029409.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: search with spaces
Posted by Otis Gospodnetic <ot...@gmail.com>.
Hi,
Add &debugQuery=query to your search requests. That will point you in the
right direction.
Otis
--
Performance Monitoring - http://sematext.com/spm/index.html
Search Analytics - http://sematext.com/search-analytics/index.html
On Thu, Dec 27, 2012 at 3:45 AM, Sangeetha <sa...@gmail.com> wrote:
> Hi,
>
> I have a text field with value O O Jaane Jaane. When i search with *q=Jaane
> Jaane* it is giving the results. But if i give *q=O O Jaane Jaane* it is
> not
> working? What could be the reason?
>
> Thanks,
> Sangeetha
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/search-with-spaces-tp4029265.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>