Metamorph Query

Post Reply
tony.malandain
Posts: 57
Joined: Sat Mar 27, 2004 6:39 pm

Metamorph Query

Post by tony.malandain »

Hi
Can someone explain to me why these 2 queries don't return the same?
1. select Id from table where text likep 'keyword1,"keyword2 keyword3"'
=> Find a match
2. select Id from table where text likep 'keyword1,keyword2 keyword3 w/150'
=> Doesn't return any match.

I'd like to have the following query:
search for: keyword1 or keyword2 near keyword3.

Also, what exactly is the difference between the likep and like predicates in terms of support of metamorph queries?

Thanks,
/Tony.
tony.malandain
Posts: 57
Joined: Sat Mar 27, 2004 6:39 pm

Metamorph Query

Post by tony.malandain »

well actually I need to have keyword1 or (keyword2 near keyword3).

I tried with parentheses as well:
keyword1,(keyword2 keyword3 w/150)
and
keyword1 (keyword2 keyword3 w/150)

but it didn't return any match.

Another thing that confuses me: what's the difference between using a coma or a space to separate keywords?

/T.
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Metamorph Query

Post by mark »

Parens in metamorph are used for "equiv" sets, generall lists of words that mean the same thing. Any one of them will satisfy that "term" of the query (like an or). Words within () must be delimited by , with no extra spaces.

Outside of parens , and space are the same as far as query parsing goes except for special pattern matchers like rex etc. where , is not used as a delimiter. I prefer to use spaces rather than commas to reduce confusion.

You'll need to do your query with a sql "or"
... likep 'keyword1' or ... likep 'keyword2 keyword3 w/150' ...
Post Reply