I have a String field where I store two-word area names.
Ex: New York
Thing is, whenever I try to query that field (area:New York
) no results come up, even though it is stored exactly as New York.
Why is this?
The results DO come up if I search like this: area:"New York"
but they wont come up if searching like this: area:New
.
Any ideas?
Here is the field-definition in the schema.xml file:
<fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/>
<field name="area" type="string" indexed="true" stored="true" omitNorms="true"/>
If you need more input let me know!
Thanks
UPDATE
$fq.=" + area:$state";
I am sending this, and Solr receives this as the variable inside state (New York)...
How can I rewrite this so it sends the variable as "New York" (with double quotes)...?