Search not working as I expected

2008-11-01 Thread Roger Binns

If I search for a partial string then it is found.  For example
searching for modul will find module etc.  I have a page with some
constants that looks like this:

  :const:`SQLITE_STATUS_ONE`, :const:`SQLITE_STATUS_TWO`,
:const:`SQLITE_STATUS_THREE`

If I do a search for SQLITE_STATUS then nothing shows up.  If I search
for the full term (eg SQLITE_STATUS_ONE) then the page is found.  I
would expect these partial matches to be found.

Sphinx 0.4.3

Roger


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sphinx-dev group.
To post to this group, send email to sphinx-dev@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en
-~--~~~~--~~--~--~---



Re: Search not working as I expected

2008-11-01 Thread Georg Brandl

Roger Binns schrieb:
 If I search for a partial string then it is found.  For example
 searching for modul will find module etc.  I have a page with some
 constants that looks like this:
 
   :const:`SQLITE_STATUS_ONE`, :const:`SQLITE_STATUS_TWO`,
 :const:`SQLITE_STATUS_THREE`
 
 If I do a search for SQLITE_STATUS then nothing shows up.  If I search
 for the full term (eg SQLITE_STATUS_ONE) then the page is found.  I
 would expect these partial matches to be found.

Yes, this is due to the way we handle search words. Since an index of
all words is impossible to generate, words from the documents are
stemmed and then compared with the search terms for exact matches.
Looking for substring matches would take much longer (since the JS
search runs on the user's machine).

However, what the new search in 0.5 does is at least search for
substring matches in object names appearing in a description unit;
e.g. if you define your constants as

.. data:: SQLITE_STATUS_ONE
  SQLITE_STATUS_TWO
  SQLITE_STATUS_THREE
  etc.

substring matches will be found.

cheers,
Georg

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sphinx-dev group.
To post to this group, send email to sphinx-dev@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en
-~--~~~~--~~--~--~---