Full Text Search Not Returning Exact Results

I have set up an Index on a bucket and am trying to search it with the FTS.
According to the Bleve page, +SpecifiedField:"String" should only return documents that have only “String” written in “SpecifiedField” exactly.

My problem is with names, I have a field name and have names stored like lastname; firstname. I search +name:"lastname; firstname".

When I run a search I am getting documents back that contain just the last name or the first name or both. The problem is that I don’t want documents that are not exactly the same as what I searched for.

Is there something I’m missing? Thanks.

Hi Jacob,
I’m assuming you looked at response I posted on your last forum post that talked about analyzers and how they break apart fields that can be indexed or searched. That should help you rule out unexpected tokenization. Some basic troubleshooting steps are described here: http://developer.couchbase.com/documentation/server/4.5/fts/fts-troubleshooting.html

I also tried a similar case on my local system and it worked just fine, but since I’m running a pre-release build I might have some different behavior than you do. I tested this out on the travel-sample bucket that ships with Couchbase Server 4.5, and I built an index and did a search using the Web Admin interface, which runs a query string query. I modified the name of one specific document so that it had a semi-colon in it, and did a search similar to yours and it found the document that I expected it to find.

Can you take a look at the troubleshooting steps for “why doesn’t a search for X return document Y?” and see if it helps your case?


Hi Will,
Yes sorry, I did see your other reply.

I will try what you suggested there and in this reply to see if i can figure out my issue.

I’ll let you know if I’m still stuck.


Hi Jacob,
No problem, let me know if you get stuck. Best,