Exclude certain fields from full-text index OR from a full-text search query

I have searched this forum and other media extensively without finding what I want, so I am posting this.

Question

======

Is it possible to exclude certain fields either from the full-text index itself (preferrably) or when using a full-text query?

In particular, I want to be able to exclude the $Updated field from the searches.

We have a database in which nearly every document has been updated by a person, let’s call him Joe Blog.

When a full-text is performed using the query “blog” every document in the database is returned, which is not what was expected.

All variations of NOT fails, and I can not find any documentation related to excluding certain fields from the full-text index.

Any ideas?

Subject: RE: Exclude certain fields from full-text index OR from a full-text search query

There’s no syntax to exclude fields – you can only specify which fields to search using the square bracket notation or FIELD keyword, e.g. [Body] = searchterm

If you want to exclude certain hidden fields on a website search, you do have the option of selecting which fields to replicate to the replica on the web server – if they’re not present in the document they won’t be included in the search. I’m not sure whether you can leave out $UpdatedBy though.

Subject: RE: Exclude certain fields from full-text index OR from a full-text search query

Thanks for the quick response Andre.Essentially, you confirmed what I suspected.

I found that in older Domino versions (pre 5) you could use a stop word file to (amongst other things) exclude certain field from the ft-index, but that file is obviously no longer used.

It is indeed a web application so the selective replication approach would be nice. However, I would be very surprised if it was possible to exclude the $-items.

My current workaround is to create a huge search-string (in JavaScript) where I build it using all the fields that I do want to search.

For example, let’s say the user has typed in “blog”.

I then build a search string like this:

“[Name] contains blog [Address] contains blog”, etc., etc.

This works but has the disadvantage of becoming very long, and Domino will not accept a query string longer than 512 characters.

Another disadvantage is that the complete search string is shown in the results form, but I can create my own to fix that.

Anyway, I’ll talk to my admin guy to see if it is possible to exclude the $-items in the replication, but I sincerely doubt it.

Subject: RE: Exclude certain fields from full-text index OR from a full-text search query

Where did you find that limitation documented? I don’t think that’s true. There is a limit but it’s not that small.

You may be looking at the limit for the length of a search term as opposed to the entire query.