AND /OR search

Post Reply
chakotay
Posts: 6
Joined: Thu Aug 28, 2003 5:15 pm

AND /OR search

Post by chakotay »

1st search:
ID like '@0 11742749 "1192484" 11192488 11735967'
Returns 2 hits. (11192488, 11735967)

2nd search:
ID > '11294103' AND ID < '11294106'
Returns 2 docs (11294104, 11294105)

now if i combine these two searches above with an 'OR' connector it retunrs 15 hits.

ID > '11294103' AND ID < '11294106' OR ID like '@0 11742749 "1192484" 11192488 11735967'

15 hits :(11192484 11192488 11294104 11294105 11735967 11924840 11924841 11924842 11924843 11924844 11924845 11924846 11924847 11924848 11924849)

looks like the double quotes around "1192484" treats it as a LIKE search only when the OR operator is used to connect both searches. I tried [ID like "1192484"] and got 0 hit.

Has anyone come across similar anomaly? I am not sure if this is an expected behavior of texis. Any help would be appreciated.

Thanks in advance.
chakotay
Posts: 6
Joined: Thu Aug 28, 2003 5:15 pm

AND /OR search

Post by chakotay »

If i drop the index then [ID like "1192484"] returns hits. (11192484,11924840,11924841,11924842,11924844,11924845,
11924846,11924847,11924848,11924849)
Recreated the index, got ZERO hits for the same term.

So it looks like if i use the OR connector, somehow the search is not using the index.
jkj2001
Posts: 142
Joined: Fri Mar 29, 2002 1:39 pm

AND /OR search

Post by jkj2001 »

I'm not sure I follow-- is one of the lessons here that OR searches won't use indexes under certain circumstances? If so, what are they?
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

AND /OR search

Post by mark »

Nothing to do with logic or quotes. It's indexed vs. linear search. wordc/langc control what linear search considers a word and if it's language or random string. index expressions control what the index search considers a word. If your wordc/langc aren't compatible with your index expression you may get different results when linear searching vs. indexed searching.
jkj2001
Posts: 142
Joined: Fri Mar 29, 2002 1:39 pm

AND /OR search

Post by jkj2001 »

Ah, now I see-- thanks guys
Post Reply