Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Can we make IS / ixsso.Query perform an AND query by default?

Posted on 2009-05-14
3
Medium Priority
?
421 Views
Last Modified: 2013-12-24
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 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:
<h2>Defence Train the Trainer (Consolidation) - 2003 </h2>

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, weve 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 were 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 its 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?
 

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;

Open in new window

0
Comment
Question by:rupertb2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 22

Accepted Solution

by:
cj_1969 earned 1500 total points
ID: 24394914
Take a look at this page ... http://msdn.microsoft.com/en-us/library/aa480443.aspx

I have got mixed information as to IS supporting the AND operator.
According to MS, it does not, at least in version 2.  But in the page referenced above it clearly shows and documents using it.  It also supports the NEAR operator (even in ver 2) which is like the AND operator but apparently it will rank the results differently depending on how far apart the words are in the document.

In the page I reference it also mentions using a comma to separate the values.  This will again change the ranking of the page hits depending on how many of the terms that it finds in the page.

One thought ... since the search engine has a built in fuzzy logic engine if it does not work with the multiple AND statements between the words, try creating a precedence using () to keep it to 2 word terms ...
i.e.  ( ( ( term1 & term2) & term3 ) & term4) it might be able to handle it in this fashion.
0
 

Author Closing Comment

by:rupertb2
ID: 31581656
Useful lateral approach
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question