Search code examples
lotusxpageslotus-domino

Building an Xpage for searching issue


I'm having a great deal of trouble with this searching page I'm building.

I have a view with documents with fields like the following: foreignCompany, ourCompany, dateStarted, dateEnded, countryOfApplication. The user enters the following parameters to search: company name (foreignCompany), date (we'll call this searchDate) and countryOfApplication.

The results show the companies that have valid contracts between the dateStarted - searchDate - dateEnded. I've partially achieved this so far.

The problem is, if the company name is for instance: Kompanija, but the user enters: Komp or Kom or Kompanij or whatever, but not Kompanija, the search returns no results!? Only if the whole word is entered is when there are results returned.

I even followed the example from IBM help, How to build an Xpage for searching, same thing happens with that too.

I'd very much appreciate any help that's given here, since I've been busting my head against the wall for quite some time now. Thank you!


Solution

  • If you are using search property on the view data source, then be aware that the search property uses the Notes Full Text search "language" for the search query - e.g. [Publish]="1" AND [Status]="Finished".

    This will search for parts of a company name using your example:

    [foreignCompany] CONTAINS Komp
    

    So you probably need to modify your search query.