lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Moiz Bhukhiya <moiz.bhukh...@gmail.com>
Subject SOLR Query
Date Thu, 12 Aug 2010 23:19:37 GMT
Hi there,


I've a problem querying SOLR for a specific field with a query string that
contains spaces. I added following lines in the schema.xml to add my own
defined fields. Fields are: ap_name, ap_address, ap_dob, ap_desg, ap_sec.

Since all these fields are beginning with ap_, I included the the following
dynamicField.
<dynamicField name="*ap_*" type="text" indexed="true" stored="true"/>


I included this line to make a query for all fields instead of a specfic
field.
<copyField source="ap_*" dest="text"/>

I added the following document in my index:

<add>
<doc>
<field name="id">1</field>
<field name="ap_name">Tom Cruise</field>
<field name="ap_address">San Fransisco</field>
</doc>
</add>

1. When I query q=Tom+Cruise, I should get the above document since it is
available in "text" which ic my default query field. [Works as expected]
2. When I query q=ap_address:Tom, I should not get the above document since
Tom is not available in ap_address. [Works as expected]
3. When I query q=ap_address:Tom+Cruise, I shouldnt not get the above
document BUT I GET IT. {Doesnt work as expected]

Could anyone please explain me what mistake I am making?

Thanks alot, appreciate any help!
Moiz

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message