Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OTSQL help

Status
Not open for further replies.

balakumar86

Programmer
Aug 29, 2008
44
0
0
GB
All,

I have 2 set of words. First set has M items and the second set has N items. I want to search for items having a word from the first set followed immediately by any word in the second set. I thought of using the OTSQL for this. I thought the below should work.

(I1 or I2 or I3 or... Im) Prox[0] (I1 or I2 or I3 or .. In)

This doesn't seem to be working. It returns lot of un necessary results.

If I simply use I1(a word from set1) prox[0] I1(a word from set 2), it returns correct results. But, when I use OR condition to check for all the words, it's not working. Am I making mistake somewhere. Please advise.

Regards,
Bala
 
you probably will get better help at the search and indexing forum .Also the syntax you are putting out there uses prox and all which tells me that you are using livelink query language (LQL) or is this actually SQL?


Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008
 
Appnair,

Sorry. It's LQL only. What I'm doing is, I'm going to Advanced Search. Selecting "Complex Query" option from the drop down and entering the above query string and searching.

Regards,
Bala
 
Bala,

How and where did you define your search query and which options did you set?

Here is a working example that does what you're looking for.

Text file has:
I1 I2 I3 I5

So my sets are: (I1,I2,I3) and (I4,I5,I6)

Do a Natural Language Query Search with mode "LiveLink aware", not "Keyword Extraction" (important).

The query looks like:

(I1 or I2 or I3 or I4) AND (I5 or I6 or I7)

Works like a charm and does NOT deliver any wrong results.

This example is really simple, you don't need Prox or any fancy options to do this. This is really pure AND/OR logic and nothing else.

 
Livelinkpro,

The options that I set are

Look For: Complex Query
Modifier: None
Within: All
Query String (I1 or I2 or ...) prox[0] (I1 or I2 or ...)

I search with these options set.

I've tried the way that you said. But, the resulting will have documents if there is a word from 1st set somewhere and a word from the 2nd set somewhere.. My requirement is one word from 1st set shoulb be followed immediately by any word from the 2nd set. Only docs which are having patterns like this should be in the result.

Regards,
Bala
 
Bala,

I am not sure if I understand your requirements properly.

If you mean, you have a document containing "A G" for example and your data sets are A,B,C vs. E,F,G (1 hit in subset 1 and subset 2) then this is not trivial to do. I'd have to look into the documentation myself and do some testing. Sorting would even further complicate this.

The fuzzier your search query is, the more complex your search query will be.

Can you come up with a real world example, where and how this kind of fuzziness would be required? I haven't met anything like that in the business as of yet.

Typically, I would recommend to start the search with common keywords and then refine your search results until you are down to the results you're looking for. This is how end users do their job in my opinion.

Jack








 
Jack,
I believe that they are trying to do the following :

Set 1 = Red, Yellow, Green
Set 2 = Apple, Orange, Pear

using this they would want :

there is a Red Apple in the tree = TRUE
this is an Apple and it is Red = FALSE
the colour is Red just like an Apple = FALSE

Greg Griffiths
Livelink Certified Developer & ECM Global Star Champion 2005 & 2006
 
Greg,

Yes. You are correct. We want to perform a search like this.

Regards,
Bala
 
Bala,

Can you please phrase this out in detail and based on examples. What does your document contain and what are you searching for plus what results do you expect?

Provide the facts rather than starting the discussion based on your assumptions. Leave that Prox stuff aside and discuss the issue from the beginning, and wait for the responses.

Jack

 
Hi Everyone,

There are many departments. And there are some documents restricted to those departements. So, I want to search documents containing words exactly like "dept1 restricted", "dept2 restricted","dept3 restricted". There are so many departments. If I search for the documents having the words "dept1" and "restricted", then that result is irrelevant. I need documents containing word like "dept restricted". Restricted is not the only one I am searching for. There are many othewr words.

As I said earlier, list 1 will have all the departments say (dept1, dept2, dept3 etc) anf list 2 will have words like (restricted, common etc). Combine every word in list 1 wth every word in list 2. If the document in livelink has any one of the combination, then I need that document in the result. Say a document having a word "dept1 common" or "dept3 restricted" should be in the result.

Hope, this makes it clear.

Regards,
Bala
 
The search pattern you describe looks like "standard regular expressions".Look for a simple example in the livelink search online help for an example query and try that.Regex searches are possible with livelink.

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top