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 zsy715 <sz...@gmail.com> on 2012/06/26 20:40:10 UTC
solr querying doesn't return result
Hey guys,
I am new to solr. Recently, I have configured solr which connects to hsql
database. I have a table ac_model which has two columns one is id_ac_model
and another one is ac_model. I run example-DIH and it works fine when I type
*:* and acid:*(or number) but it doesn't work when I type model:*(or some
string here). It seems I can't search model.
The following is my configuration in data-config.xml:
<dataConfig>
<dataSource ... />
<document>
<entity name="AC_MODEL" query="select * from AC_MODEL">
<field column="ID_AC_MODEL" name="acid" />
<field column="AC_MODEL" name="model" />
</entity>
</document>
</dataConfig>
schema.xml:
<fields>
<field name="acid" type="string" indexed="true" stored="true"
required="true" />
<field name="model" type="text" indexed="true" stored="true"
required="true"/>
</fields>
<uniqueKey>acid</uniqueKey>
<defaultSearchField>model</defaultSearchField>
<solrQueryParser defaultOperator="OR"/>
--------------------------------------------------------------------------------
I have done some research. I have defaultSearchField and set indexed,stored
as true. Anybody can help me out? I appreciate it.
--
View this message in context: http://lucene.472066.n3.nabble.com/solr-querying-doesn-t-return-result-tp3991424.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: solr querying doesn't return result
Posted by Erick Erickson <er...@gmail.com>.
It _sounds_ like you changed your schema.xml file in the process.
Essentially, any time
you change your schema, re-indexing everything is called for.
FWIW,
Erick
On Tue, Jun 26, 2012 at 3:51 PM, zsy715 <sz...@gmail.com> wrote:
> I think I have fixed the problem by just importing data again. Finally~~
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/solr-querying-doesn-t-return-result-tp3991424p3991433.html
> Sent from the Solr - User mailing list archive at Nabble.com.
Re: solr querying doesn't return result
Posted by zsy715 <sz...@gmail.com>.
I think I have fixed the problem by just importing data again. Finally~~
--
View this message in context: http://lucene.472066.n3.nabble.com/solr-querying-doesn-t-return-result-tp3991424p3991433.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: solr querying doesn't return result
Posted by zsy715 <sz...@gmail.com>.
actually, it works when type model:* but not for model:F100(F100 is a model
number)
--
View this message in context: http://lucene.472066.n3.nabble.com/solr-querying-doesn-t-return-result-tp3991424p3991426.html
Sent from the Solr - User mailing list archive at Nabble.com.