Solr only search in default field
I can't search in other field than the default. With q=field:search doesn't return nothing (but documents exists obsviouly). Also didn't find it with defType=dismax.
In开发者_如何学运维 the schema.xml I have the field with indexed="true" and stored="true" just like the default one.
What I am missing ?
Thanks in advance.
So you are issuing a GET? Have you checked your encoding the ':', as it should be %3A. Without the right encoding you maybe trying to search the default field for 'field:search'.
Can you test your query in /solr/admin ?
just checking, if you changed your schema, you need to delete the data in /var/data and restart solr, otherwise you may be searching old not indexed stuff.
If you are using a DisMax search make sure that you have the fields you are searching added to the query fields parameter solr search. It might just be that you are declaring a qf
parameter in your search statement and your field is missing from the list.
This may be a bit too plain, but did you - besides restarting your solr instance - remember reindex? Otherwise changes in the schema.xml
won't apply.
精彩评论