bhomass
bhomass

Reputation: 3572

solr search by fq is matching partial string

I set up a Solr instance with some documents already indexed. I want to use filter query to query for certain documents by its url field. The q field is fed the wild card string, and the fq field is given the full url string.

q=*:*
fq=url:'mysite.com'

This query returns all documents that match url:com.

So any domain that ends in dot com is returned.

How do I get it to return only whole string matches, meaning documents in the domain mysite.com?

Upvotes: 1

Views: 1465

Answers (1)

bhomass
bhomass

Reputation: 3572

double quote is the fix.

"mysite.com" gives the right results.

Upvotes: 1

Related Questions