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 BobG <bo...@bitwise-bncc.nl> on 2010/09/04 10:15:11 UTC
Newbie question: no search results
Hi,
I am trying to set up a new SOLR search engine on a windows platform. It
seems like I managed to fill an index with the contents of my SQL server
table.
When I use the default *.* query I get a nice result:
<?xml version="1.0" encoding="UTF-8" ?>
- <response>
- <lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">0</int>
- <lst name="params">
<str name="q">*:*</str>
</lst>
</lst>
- <result name="response" numFound="19774" start="0">
- <doc>
<str name="Artikel">Kerstman baardstel</str>
<str name="Omschrijving">Baardstel kerstman. Pruik en baard met
snor.</str>
<str name="Shop_artikel_rg">26DF49BF-A3AE-11D5-AAE9-0000C50EF305</str>
</doc>
- <doc>
<str name="Artikel">Kerstman baardstel D</str>
<str name="Omschrijving">Baardstel D kerstman. Pruik en baard met
snor.</str>
<str name="Shop_artikel_rg">09D8A643-6714-11D5-AAD5-0050DADF6D86</str>
</doc>
- <doc>
<str name="Artikel">Kerstman baardstel Santa</str>
<str name="Omschrijving">Baardstel kerstman Santa. Pruik en baard met
snor.</str>
<str name="Shop_artikel_rg">09D8A649-6714-11D5-AAD5-0050DADF6D86</str>
</doc>
------more results
However when I try to query the table with a search term I get no results.
<?xml version="1.0" encoding="UTF-8" ?>
- <response>
- <lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">0</int>
- <lst name="params">
<str name="q">Artikel:Kerstman</str>
</lst>
</lst>
<result name="response" numFound="0" start="0" />
</response>
What am I doing wrong here?
Thanks for your help.
Bob
--
View this message in context: http://lucene.472066.n3.nabble.com/Newbie-question-no-search-results-tp1416482p1416482.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Newbie question: no search results
Posted by BobG <bo...@bitwise-bncc.nl>.
Hi Lance and Gora,
Thanks for your support!
I have changed
<fields>
<field name="Shop_artikel_rg" type="string" indexed="true" stored="true"
/>
<field name="Artikel" type="string" indexed="true" stored="true" />
<field name="Omschrijving" type="string" indexed="true" stored="true" />
</fields>
Into
<fields>
<field name="Shop_artikel_rg" type="string" indexed="true" stored="true"
/>
<field name="Artikel" type="text" indexed="true" stored="true" />
<field name="Omschrijving" type="text" indexed="true" stored="true" />
</fields>
In the schema.xml, then restarted Tomcat.
Also I used quotation marks for my search string and it works fine now!
Problem solved!
Best regards,
Bob
--
View this message in context: http://lucene.472066.n3.nabble.com/Newbie-question-no-search-results-tp1416482p1422211.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Newbie question: no search results
Posted by Lance Norskog <go...@gmail.com>.
More directly: if the 'Artikel' field is a "string", only the whole
string will match:
Artikel:"Kerstman baardstel".
Or you can use a wildcard: Kerstmann* or just Kerst*
If it is a "text" field, it is chopped into words and
q=Artikel:Kerstmann would work.
Gora Mohanty wrote:
> On Sat, 4 Sep 2010 01:15:11 -0700 (PDT)
> BobG<bo...@bitwise-bncc.nl> wrote:
>
>
>> Hi,
>> I am trying to set up a new SOLR search engine on a windows
>> platform. It seems like I managed to fill an index with the
>> contents of my SQL server table.
>>
>> When I use the default *.* query I get a nice result:
>>
> [...]
>
>> However when I try to query the table with a search term I get no
>> results.
>>
> [...]
>
>
>> What am I doing wrong here?
>>
> [...]
>
> Could you post your schema.xml. In particular, how is the "Artikel"
> field being processed at index/query time?
>
> Regards,
> Gora
>
Re: Newbie question: no search results
Posted by Gora Mohanty <go...@srijan.in>.
On Sat, 4 Sep 2010 01:15:11 -0700 (PDT)
BobG <bo...@bitwise-bncc.nl> wrote:
>
> Hi,
> I am trying to set up a new SOLR search engine on a windows
> platform. It seems like I managed to fill an index with the
> contents of my SQL server table.
>
> When I use the default *.* query I get a nice result:
[...]
> However when I try to query the table with a search term I get no
> results.
[...]
> What am I doing wrong here?
[...]
Could you post your schema.xml. In particular, how is the "Artikel"
field being processed at index/query time?
Regards,
Gora