i want to search within address and text is new york,
i have enabled debug log and below is debug log ....
rawquerystring: "shipment_recepient_name6:New york",
querystring: "shipment_recepient_name6:New york",
parsedquery: "+shipment_recepient_name6:New +shipment_recepient_name1:york ", parsedquery_toString: "+shipment_recepient_name6:New +shipment_recepient_name1:york ",
My doubt is i am searching on field6 and why its rest of the word search on field1(my default search field) .can you suggest a schema where i can search the address and based on the highest matching score returns res –
I want to search New York as word in one of the field contains comma separated address.
Have you tried to url-encode your query:
http://localhost:8080/solr/select?q=shipment_recepient_name6:New%20york
Also, since you need exact phrase match, try using quotes.
It's also very important how those sentences you throw to Solr end up looking inside solr's index. To examine that, you can use a great tool called Luke (ideal for beginners to figure out how it all works in the background).
For advanced querying see these resources:
http://www.lucidimagination.com/blog/2010/05/23/whats-a-dismax/
http://wiki.apache.org/solr/DisMaxQParserPlugin
http://wiki.apache.org/solr/ExtendedDisMax
http://www.lucidimagination.com/blog/2009/02/22/exploring-query-parsers/
http://www.lucidimagination.com/blog/2011/08/08/solr-powered-isfdb-part-11/