--- On Sun, 11/14/10, PeterKerk <vettepa...@hotmail.com> wrote:

> From: PeterKerk <vettepa...@hotmail.com>
> Subject: Re: full text search in multiple fields
> To: solr-user@lucene.apache.org
> Date: Sunday, November 14, 2010, 8:52 PM
> 
> Ok, thanks. it works now for title and description fields.
> :)
> 
> But now I also need it for the city. And I cant get that to
> work, even
> though im doing the exact same (or so I think).
> 
> I now have the code below for the city field. 
> (Im defining city field twice in my data-config and
> schema.xml but thats
> because I want the city field to be indexed both as string
> (whole value) and
> as text. Though thats not the point now.)
> 
> data-config.xml
> <field name="city" column="CITY" />
> <field name="city_search" column="CITY" />
> 
> 
> schema.xml
> <field name="city" type="string" indexed="true"
> stored="true"/>
> <field name="city_search" type="text_ws" indexed="true"
> stored="true"/>  
> <!-- tried type "text", "text_ws" and "string" -->
> <field name="citytext_search" type="text" indexed="true"
> stored="true"/>
> <copyField source="city_search"
> dest="citytext_search"/>
> 
> URL:
> http://localhost:8983/solr/db/select/?q=amsterdam&defType=dismax&qf=citytext_search^10.0
> 
> The value in the db for the city field is "amsterdam"

Everything seems fine. What happens when you do these two queries?

8983/solr/db/select/?q=citytext_search:amsterdam&defType=lucene
8983/solr/db/select/?q=citytext_search:[* TO *]&defType=lucene






Reply via email to