Jump to content
IGNORED

Searching with '.' in the expression doesn't work as expected


GroovyBee

Recommended Posts

So, I looked through the Sphinx documentation a bit. The period is treated as a separator, just as a space is, so it is not preserved when the query engine generates indicies. Which makes sense, since the period is a commonly used punctuation mark. It is possible to add the period to the character set the engine uses to recognize words to be indexed, but then you'll end up with words with periods in the search index (as well as decimal numbers). You then have to enable partial word searching, which would hugely increase the size of the search index and slow down querying as a result. This would also muddle search results as you'd get back quite a few more results, especially for shorter search terms that are part of longer words. I don't really see a feasible solution, unfortunately.

 

..Al

  • Like 1
Link to comment
Share on other sites

Whoops, had to change this post, as I can't link directly to the thread on Invision's site since the support forums are only available to customers. Basically, there's a function in the forum that's stripping out various characters and strips them out, including the period. I'll have to modify this as well, once I get Sphinx upgraded and verify it's working without issues (before I even try to enable the blend_chars directive).

 

Fun fun!

 

..Al

Link to comment
Share on other sites

It works! :D :D

 

Please try some searches to see if you're getting the results you're expecting. Hopefully there are no side effects of what I just did. The search index is be a bit larger (since more terms are added to the index), but shouldn't really affect anything. If you see anything odd, please let me know.

 

Thanks,

 

..Al

  • Like 1
Link to comment
Share on other sites

I searches but when you click on the thread title you get a File not found error.

 

LOL, of course it does. Damn Invision. Let me see if I can track that down. Nothing can be simple! It's possible this is a bug that has already been fixed in a newer version of the software. We're running 3.3.4 and Invision is about to release 3.4.2 (which has some significant changes, mostly under the hood). I'll look through the bug reports before I start digging through code.

 

..Al

Link to comment
Share on other sites

I see the problem, the URL is malformed due to the period in the search term:

 

http://www.atariage.com/forums/topic/207607-searching-with-in-the-expression-doesnt-work-as-expected/page__hl__%2B2.3

 

If you remove everything starting with the "page_hl...", the link will work. The purpose of this variable is to highlight the search term on the page. Since Invision normally strips this character out of the search terms, it's no surprise that these results are now broken when including a period in the search term. Thus, I doubt it's something Invision would have fixed on their own. I'll have to devise a fix of my own.

 

..Al

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...