views:

223

answers:

0

We are using the ixsso.Query object to access an indexing service catalogue through a ColdFusion script. We are currently having issues with structuring the query. The website has a single field free text input and assumes the user is entering the text in an unstructured form.

We need to perform queries that ‘AND’ all the inputted keywords.

Example queries: These examples are using a IS catalogue which has indexed 700 pages indexed. The target page has this heading:

Defence Train the Trainer (Consolidation) - 2003

“Train the trainer 2003” Returns 350 pages, clearly it is ORing the terms

“Train the trainer” 2003 Returns 1 page – the target page

We want to enable the user to enter the term to return the 1 page, we’ve tried taking the search term and programmatically turning it into AND separated terms.

e.g.

Train AND the AND trainer AND 2003 Returns: AutomationException: 0x80041605 - The query contained only ignored words

If we remove the ‘the’ and try

Train AND trainer AND 2003 Returns 1 page – the target page

This is obviously because we’re removing the noise word before constructing the query, however the list of noise words is quite extensive, so we would need to write a routine to check and clear any search term of noise words before it’s submitted to IS.

Questions. • Can we make IS / ixsso.Query perform an AND query by default? • Can we make IS / ixsso.Query ignore the noise words?

Any help we can get would be great!

Code used

cmssearch = createobject("com", "ixsso.Query");
cmssearch.Catalog("training"); 
cmssearch.Query = ‘searchterm’;
cmssearch.SortBy("rank [d]");
cmssearch.Columns("path");
searchresults = cmssearch.CreateRecordset("nonsequential");
fields = searchresults.fields;