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 Mohammad Shariq <sh...@gmail.com> on 2011/06/17 12:04:07 UTC

Search failed even if it has the keyword .

Hello,
solr-search failed even if it has the keyword .
I am using solr (solr3.1 on ubuntu 10.10) for Indexing the tweets.
I am indexing certain tweets, but solr do'nt return any result when I search
any keyword from tweet.

in Solr, tweet is stored as 'text'.
below is the tweet which I index :
*"RT @Khan_KK: DescribeYourImageWithAMovieTitle Khan Rais"*

once this tweet is index, I search for :
*
http://127.0.0.1:8983/solr/select/?q=DescribeYourImageWithAMovieTitle&version=2.2&start=0&rows=10&indent=on
*

and nothing is returned from Solr even though this tweet is there in the
solr.
I tried searching many keywords e.g. describe, image, movie  but nothing is
returned from solr.
I am using 'text' field of solr3.1.
am I using right textChunker ??
please help me.




-- 
Thanks and Regards
Mohammad Shariq

Re: Search failed even if it has the keyword .

Posted by Mohammad Shariq <sh...@gmail.com>.
very very thanks Parvesh.
my 'title' was 'text'  whereas 'defaultquery'  was 'query_text'.

I change my 'defaultquery'  to 'text' and problem is solved.

thanks again.

On 17 June 2011 16:57, pravesh <su...@yahoo.com> wrote:

> What is the type for the field's  defaultquery & title in your schema.xml ?
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Search-failed-even-if-it-has-the-keyword-tp3075626p3075797.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
Thanks and Regards
Mohammad Shariq

Re: Search failed even if it has the keyword .

Posted by pravesh <su...@yahoo.com>.
What is the type for the field's  defaultquery & title in your schema.xml ?

--
View this message in context: http://lucene.472066.n3.nabble.com/Search-failed-even-if-it-has-the-keyword-tp3075626p3075797.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Search failed even if it has the keyword .

Posted by Mohammad Shariq <sh...@gmail.com>.
Hi Pravesh,
this is how my schema looks for 'text' field :
<fieldType name="text" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" enablePositionIncrements="true"/>
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1"
generateNumberParts="1" catenateWords="1" catenateNumbers="1"
catenateAll="0" splitOnCaseChange="1"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.SnowballPorterFilterFactory" language="English"
protected="protwords.txt"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="true"/>
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" enablePositionIncrements="true"/>
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1"
generateNumberParts="1" catenateWords="0" catenateNumbers="0"
catenateAll="0" splitOnCaseChange="1"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.SnowballPorterFilterFactory" language="English"
protected="protwords.txt"/>
</analyzer>
</fieldType>

My default search field is 'defaultquery'
and I am copy field is :
<copyField source="title" dest="defaultquery"/>
<copyField source="description" dest="defaultquery"/>
<copyField source="siteurl" dest="defaultquery"/>

And My tweet is indexed into 'title'.



On 17 June 2011 15:46, pravesh <su...@yahoo.com> wrote:

> First check, in your schema.xml, which is your default search field. Also
> look if you are using WordDelimiterFilterFactory in your schema.xml for the
> specific field. This would tokenize your words on every capital letter, so,
> for the word "DescribeYourImageWithAMovieTitle" will be broken into
> multiple
> tokens and each will be searchable.
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Search-failed-even-if-it-has-the-keyword-tp3075626p3075644.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
Thanks and Regards
Mohammad Shariq

Re: Search failed even if it has the keyword .

Posted by pravesh <su...@yahoo.com>.
First check, in your schema.xml, which is your default search field. Also
look if you are using WordDelimiterFilterFactory in your schema.xml for the
specific field. This would tokenize your words on every capital letter, so,
for the word "DescribeYourImageWithAMovieTitle" will be broken into multiple
tokens and each will be searchable.

--
View this message in context: http://lucene.472066.n3.nabble.com/Search-failed-even-if-it-has-the-keyword-tp3075626p3075644.html
Sent from the Solr - User mailing list archive at Nabble.com.