Jump to content

No search results for "3.1.1"?


Clickfinity

Recommended Posts

Hmmmm ... I though that putting quotes around the search item made it a single item?

Or is it because of the full stops? are they breaking the single-itemness of the query into parts, i.e.; 3+1+1 (311)

Surely anything in quotes shouldn't be broken-up into individual items and full stops should be treated differently when surrounded by numbers?

I don't profess to understand how much of any of this all works mind you, just wondered what was happening and whether it was broken or working as intended ... :whistle:

Cheers,
Shaun :D

Link to comment
Share on other sites


As far as I can recall number searching (except for an individual number) has never worked well in IPB, not a big problem though...




For most perhaps, but what about running a software / support site with lost of different version numbers etc.?

I just wondered if there was some sort of preferred syntax that would work better with numbers?

Cheers,
Shaun :D
Link to comment
Share on other sites

Basically to be able to do that you would have to turn off mysql fulltext AND sphinx search support, and use the old fashioned "traditional" search method.

MySQL fulltext searching will break it into separate "words". I'm not positive if it's quoted if it still does that (don't have the ambition to test at the moment).

Sphinx also uses a period as a word separator. You could change this in Sphinx configuration, but I assure you - you don't want to. It will break your normal textual searches most likely (if a word ended in a period, i.e. the end of a sentence, it wouldn't be found unless you included the period in the search term in that configuration).

These are tradeoffs you run into.

Link to comment
Share on other sites


Basically to be able to do that you would have to turn off mysql fulltext AND sphinx search support, and use the old fashioned "traditional" search method.



MySQL fulltext searching will break it into separate "words". I'm not positive if it's quoted if it still does that (don't have the ambition to test at the moment).



Sphinx also uses a period as a word separator. You could change this in Sphinx configuration, but I assure you - you don't want to. It will break your normal textual searches most likely (if a word ended in a period, i.e. the end of a sentence, it wouldn't be found unless you included the period in the search term in that configuration).



These are tradeoffs you run into.




Thanks, and on that very full and technical answer I'll withdraw ... :D lol

It's always worth asking though as on occasion there are some little magic tweaks that can save time / makes things work how you'd like.

I'll admit defeat on the searching for numbers though, as the last thing I'd want to trade-off is the general search-ability of the rest of my site.

Cheers,
Shaun :D
Link to comment
Share on other sites



For most perhaps, but what about running a software / support site with lost of different version numbers etc.?



I am actually a mod/admin at a software / support site :rolleyes:

Most people just reply to the latest thread, which is the thread you will find without the numbers being taken into account.

I mostly use Google search to find stuff, I must confess... Just add 'site: yoursite.com' to your search and it'll find only results from your site :)

I agree with you though, would be really nice if this could be fixed, but as I said before: (for me) this is not a major issue.

Edit:

ps I think it's really annoying you (IPS) disabled quote embedding... I make sure my posts don't contain large/too many quotes, whenever possible. The ignorance/'unknowingness' of certain people shouldn't lead to inconvenience for other people, I think.
Link to comment
Share on other sites

  • Management

I have tweaked Sphinx to ignore the period when searching. You should be able to search for "3.1.2" which will process as "312" which will match "3.1.2" as well as "312". Better than nothing. :)

Link to comment
Share on other sites


I have tweaked Sphinx to ignore the period when searching. You should be able to search for "3.1.2" which will process as "312" which will match "3.1.2" as well as "312". Better than nothing. :)



We are not using Sphynx (we are using Traditional) but yet we are experiencing some of these issues...

There's the same issue with dots screwing up the result (with numbers used). Searching for '8.0.8' (without the quotes) doesn't give any results, but there are, and searching for "8.0.8" (with the quotes) doesn't give any results either.

'Search Titles Only' for a word like 'software' presents you with just one result, but yet it says there are like 20 more pages of results. None can be viewed.

I'd really rather not say this, but the search in IPB 2.x was way better... :( (Maybe rip it out of 2 and put it in 3, with some new clothes? :P)
Link to comment
Share on other sites


I have tweaked Sphinx to ignore the period when searching. You should be able to search for "3.1.2" which will process as "312" which will match "3.1.2" as well as "312". Better than nothing. :)




Wahey ... I like it.

How would I tweak Sphinx to do that on my server?

Cheers,
Shaun :D
Link to comment
Share on other sites


I have tweaked Sphinx to ignore the period when searching. You should be able to search for "3.1.2" which will process as "312" which will match "3.1.2" as well as "312". Better than nothing. :)




That's an interesting idea. I've seen similar ideas mentioned elsewhere, but haven't tested them.



Wahey ... I like it.



How would I tweak Sphinx to do that on my server?



Cheers,


Shaun :D




I gather when you upgrade, you just download the new sphinx.conf file and rebuild your indexes.
Link to comment
Share on other sites

Would there be any way to escape the .'s (not sure if I'm using the right terminology here).

Sort of like in regex, using . to match a period instead of any character. So when 3.1.1 is typed in, it would be converted (for example) to 3.1.1 so that the .'s won't be ignored or treated differently?

Link to comment
Share on other sites

  • 2 years later...
This is an old topic, but I have some new information. One of my users was complaining that searching for terms with periods didn't work, and after investigating a bit I was able to come up with a solution:
1) You need to be running Sphinx version 1.10-beta or newer. I was actually running version 0.9.9, so I upgraded to 2.0.6.
2) Add the the following directive to the configuration block for each index in your sphinx.conf file:
blend_chars = .
For example:
index forums_search_posts_main
{
        source                  = forums_search_posts_main
        path                    = /var/sphinx/ipb3/forums_search_posts_main
 
        docinfo                 = extern
        mlock                   = 0
        morphology              = none
        min_word_len    = 2
        charset_type    = sbcs
        html_strip              = 0
        #infix_fields    = post, title
        #min_infix_len   = 3
        #enable_star     = 1
        blend_chars = .
 
}
What this does is tells the search engine to add additional keywords to the index containing any blend characters you include with the directive, but to also treat the character(s) as separators. More information here:
3) Invision normally strips out the period character before passing it along to Sphinx. To fix that, you need to modify the following file:
/admin/sources/classes/search/engines/sphinx.php
Look for the line:
$search_term = str_replace( array( '.', ')', '(', '!', '@', '[', ']', '~', '^' ), '', $search_term );
and replace with:
$search_term = str_replace( array( ')', '(', '!', '@', '[', ']', '~', '^' ), '', $search_term );
4) Rebuild your search indicies from the command line. You can look at the crontab entry for the proper command. You can view the crontab by typing "crontab -l".
You should now be able to search for phrases with periods in them, including version numbers for software. Wish we had that here on the Invision forum! I usually have to use Google to get meaningful results on this forum.
If you rebuild your sphinx.conf within the ACP, you'll need to add the "blend_chars" entry to whatever indexes you added it to.
..Al
PS: Invision, there are huge problems with the code tag right now!!!
Link to comment
Share on other sites

Shame there is now way to do this without editing core files.

Would be nice if there was an option in the ACP search settings to specify which "special" characters to ignore in search keywords. There's another thread somewhere here where someone was trying to allow the dash character for similar reasons.

..Al

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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