solr querying doesn't return result

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

solr querying doesn't return result

zsy715
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.

Reply | Threaded
Open this post in threaded view
|

Re: solr querying doesn't return result

zsy715
actually, it works when type model:* but not for model:F100(F100 is a model number)
Reply | Threaded
Open this post in threaded view
|

Re: solr querying doesn't return result

zsy715
I think I have fixed the problem by just importing data again. Finally~~
Reply | Threaded
Open this post in threaded view
|

Re: solr querying doesn't return result

Erick Erickson
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 <[hidden email]> 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.