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 "M.Rizwan" <mu...@sigmatec.com.pk> on 2010/05/26 14:51:16 UTC

searching documents in solr

Hi All,

I have a strange problem. I have 3 documents in my solr index. Title is
default search field.
3 documents have titles *new1*, *new2*, *new3* respectively.

Now if I search for **new1* .. it does not return anything
but if I search for **new* .. it returns all 3 documents

Why is it behaving like this? It should return one post for the first case,
but its returning nothing.

Thanks

Riz

Re: searching documents in solr

Posted by Lance Norskog <go...@gmail.com>.
Leading wildcards don't work.

word* is supported
word? is supported
word*x or word?x should be supported, but something strange happens
involving boolean queries.

On Wed, May 26, 2010 at 11:31 PM, dotriz
<mu...@sigmatec.com.pk> wrote:
>
> Here is my schema.xml file
>
> http://lucene.472066.n3.nabble.com/file/n847355/schema.xml schema.xml
> --
> View this message in context: http://lucene.472066.n3.nabble.com/searching-documents-in-solr-tp844800p847355.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
Lance Norskog
goksron@gmail.com

Re: searching documents in solr

Posted by dotriz <mu...@sigmatec.com.pk>.
Here is my schema.xml file

http://lucene.472066.n3.nabble.com/file/n847355/schema.xml schema.xml 
-- 
View this message in context: http://lucene.472066.n3.nabble.com/searching-documents-in-solr-tp844800p847355.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: searching documents in solr

Posted by dotriz <mu...@sigmatec.com.pk>.
Thank you for your reply.

let me clarify that I am trying to do a wildcard search.
There are documents with title ( title is default search field ) new1, new2,
new3

searching new*  will return all three posts but searching
whereas *new1 returns no document, when it should return at-least one
document with title new1. 

Here is output of the solr ( I am searching from admin area of solr )

<response> 
 <lst name="responseHeader"> 
 <int name="status">0</int> 
 <int name="QTime">1</int> 
 <lst name="params"> 
  <str name="indent">on</str> 
  <str name="start">0</str> 
  <str name="q">*new1</str> 
  <str name="version">2.2</str> 
  <str name="rows">10</str> 
 </lst> 
</lst> 
<result name="response" numFound="0" start="0"/> 
</response> 

Any ideas?
-- 
View this message in context: http://lucene.472066.n3.nabble.com/searching-documents-in-solr-tp844800p847339.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: searching documents in solr

Posted by Lance Norskog <go...@gmail.com>.
solr/admin/analysis.jsp allows you to explore what the analyser stacks
do. This is the best way to learn.

On Wed, May 26, 2010 at 6:13 PM, Chris Hostetter
<ho...@fucit.org> wrote:
>
> To add to he excellent advise so far: when asking a question, please be
> explicit and show actual URLs used when querying solr, and actaul
> responses recieved (or if you are using a client library: show the code)
>
> In your specific example: you are using astrix characters ("*") in an odd
> way, making it impossibly for me to guess wether you are actually trying
> to do wildcard type queries or not  (at first they seemed like you were
> using them to denote emphasis, but then you have an uneven number in some
> examples),
>
> If you had posted the REAL urls you had tried, and the responses you got,
> there would be no ambiguity.
>
> : Date: Wed, 26 May 2010 10:26:47 -0400
> : From: Erick Erickson <er...@gmail.com>
> : Reply-To: solr-user@lucene.apache.org
> : To: solr-user@lucene.apache.org
> : Subject: Re: searching documents in solr
> :
> : Your almost certainly using an analyzer that splits on or
> : throws out numbers. Here's a good place to start, not to
> : mention the SOLR admin analyzer page:
> : http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters
> :
> : <http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters>hth
> : Erick
> :
> : On Wed, May 26, 2010 at 9:14 AM, MitchK <mi...@web.de> wrote:
> :
> : >
> : > Hi dotriz,
> : >
> : > to answer such questions it would be beneficial for us, if you can provide
> : > some schema.xml-information.
> : >
> : > Kind regards
> : > - Mitch
> : > --
> : > View this message in context:
> : > http://lucene.472066.n3.nabble.com/searching-documents-in-solr-tp844800p844847.html
> : > Sent from the Solr - User mailing list archive at Nabble.com.
> : >
> :
>
>
>
> -Hoss
>
>



-- 
Lance Norskog
goksron@gmail.com

Re: searching documents in solr

Posted by Chris Hostetter <ho...@fucit.org>.
To add to he excellent advise so far: when asking a question, please be 
explicit and show actual URLs used when querying solr, and actaul 
responses recieved (or if you are using a client library: show the code)

In your specific example: you are using astrix characters ("*") in an odd 
way, making it impossibly for me to guess wether you are actually trying 
to do wildcard type queries or not  (at first they seemed like you were 
using them to denote emphasis, but then you have an uneven number in some 
examples),

If you had posted the REAL urls you had tried, and the responses you got, 
there would be no ambiguity.

: Date: Wed, 26 May 2010 10:26:47 -0400
: From: Erick Erickson <er...@gmail.com>
: Reply-To: solr-user@lucene.apache.org
: To: solr-user@lucene.apache.org
: Subject: Re: searching documents in solr
: 
: Your almost certainly using an analyzer that splits on or
: throws out numbers. Here's a good place to start, not to
: mention the SOLR admin analyzer page:
: http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters
: 
: <http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters>hth
: Erick
: 
: On Wed, May 26, 2010 at 9:14 AM, MitchK <mi...@web.de> wrote:
: 
: >
: > Hi dotriz,
: >
: > to answer such questions it would be beneficial for us, if you can provide
: > some schema.xml-information.
: >
: > Kind regards
: > - Mitch
: > --
: > View this message in context:
: > http://lucene.472066.n3.nabble.com/searching-documents-in-solr-tp844800p844847.html
: > Sent from the Solr - User mailing list archive at Nabble.com.
: >
: 



-Hoss


Re: searching documents in solr

Posted by Erick Erickson <er...@gmail.com>.
Your almost certainly using an analyzer that splits on or
throws out numbers. Here's a good place to start, not to
mention the SOLR admin analyzer page:
http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters

<http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters>hth
Erick

On Wed, May 26, 2010 at 9:14 AM, MitchK <mi...@web.de> wrote:

>
> Hi dotriz,
>
> to answer such questions it would be beneficial for us, if you can provide
> some schema.xml-information.
>
> Kind regards
> - Mitch
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/searching-documents-in-solr-tp844800p844847.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: searching documents in solr

Posted by MitchK <mi...@web.de>.
Hi dotriz,

to answer such questions it would be beneficial for us, if you can provide
some schema.xml-information.

Kind regards
- Mitch
-- 
View this message in context: http://lucene.472066.n3.nabble.com/searching-documents-in-solr-tp844800p844847.html
Sent from the Solr - User mailing list archive at Nabble.com.