Kinook Software Forum

Go Back   Kinook Software Forum > Ultra Recall > [UR] General Discussion
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-10-2011, 09:19 AM
cnewtonne cnewtonne is online now
Registered User
 
Join Date: 07-27-2006
Posts: 519
How To Search Based On Order Of Words In A Sentence?

My urd db has FTS enabled. I'm trying to search based on the order of words e.g.
1) Item 1 text contains "my name is cnewtonne".
2) Item 2 text contains "cnewtonne is my name"

I want to search so that it only returns the item where "cnewtonne" APPEARS AFTER "name"

I tried the following search phrases, but none worked ...

- name NEAR cewntonne: returns both.
- name .* cnewtonne: both
- "name is cnewtonne": returns first, but I can not always tell what and how many words are between 'name' and 'cnewtonne'
- Also, for the search work NEAR, how near is near?

Thank you.
Reply With Quote
  #2  
Old 02-10-2011, 10:24 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Search for

*name * newtonne*

NEAR searches are within 10 words by default, which can be modified like this:

newtonne NEAR/5 name

See here for more details on FTS search syntax (there is a section on NEAR queries): http://www.sqlite.org/fts3.html
Reply With Quote
  #3  
Old 02-10-2011, 01:38 PM
cnewtonne cnewtonne is online now
Registered User
 
Join Date: 07-27-2006
Posts: 519
This is good.
I see that NEAR does not honor order ...

So, search phrase 'one NEAR two' returns both of these ...

one comes before two
two comes after one


Also, phrase '*one * two*' returns

one comes before two
and
one is too far ... ... ... ... ...x100 from two (... represents 100 lines of text)
but NOT
two comes after one

So ...
Is there a way to have both effects. i.e. have NEAR and order together so it only returns

one comes before two


Thank you.
Reply With Quote
  #4  
Old 02-10-2011, 01:48 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Try an advanced search with

name NEAR newtonne

in 'Search for' and

(Item) matches wildcard *name * newtonne*

in the grid.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 06:20 PM.


Copyright © 1999-2023 Kinook Software, Inc.