Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt November 11, 2024
Clickfinity Posted July 5, 2010 Posted July 5, 2010 Just searched for "3.1.1" and got - No results found for '"3.1.1"' Why is that? Cheers, Shaun :D
Misi Posted July 5, 2010 Posted July 5, 2010 Just searched for "3.1.1" and got - No results found for '"3.1.1"' Why is that? Cheers, Shaun :D I guess your search was interpreted as you were searching for tree 1 letter words as: 3 1 1
Clickfinity Posted July 5, 2010 Author Posted July 5, 2010 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
Misi Posted July 5, 2010 Posted July 5, 2010 Hmmmm ... I though that putting quotes around the search item made it a single item? Seems even quotes do not make it a single item:http://community.invisionpower.com/topic/315339-testing-search/
Clickfinity Posted July 6, 2010 Author Posted July 6, 2010 Try using Single Quotes '3.1.1' Nope, that didn't work either ... returned all sort of results that had no mention of 3.1.1 ...
shought Posted July 6, 2010 Posted July 6, 2010 As far as I can recall number searching (except for an individual number) has never worked well in IPB, not a big problem though...
Clickfinity Posted July 6, 2010 Author Posted July 6, 2010 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
bfarber Posted July 6, 2010 Posted July 6, 2010 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.
Clickfinity Posted July 6, 2010 Author Posted July 6, 2010 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
shought Posted July 7, 2010 Posted July 7, 2010 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.
Management Matt Posted July 7, 2010 Management Posted July 7, 2010 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. :)
MadMikeyB Posted July 7, 2010 Posted July 7, 2010 In the UK we call it a FULL STOP. Bah. Felt that worth mentioning. :P
shought Posted July 7, 2010 Posted July 7, 2010 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)
Management Matt Posted July 7, 2010 Management Posted July 7, 2010 The issue isn't IP.Board. Both Sphinx and MySQL (traditional) remove periods and index "3" "1" "1" separately. There's nothing we can do.
Clickfinity Posted July 7, 2010 Author Posted July 7, 2010 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
bfarber Posted July 7, 2010 Posted July 7, 2010 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.
Wolfie Posted July 7, 2010 Posted July 7, 2010 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?
AtariAge Posted January 15, 2013 Posted January 15, 2013 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: http://sphinxsearch.com/docs/1.10/conf-blend-chars.html 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!!!
bfarber Posted January 15, 2013 Posted January 15, 2013 PS: Invision, there are huge problems with the code tag right now!!! We're working on it, I promise.
AtariAge Posted January 15, 2013 Posted January 15, 2013 We're working on it, I promise. Yeah, I looked in the Bug Tracker after I (finally!) finished my post. :) Thanks, ..Al
Pross22 Posted January 17, 2013 Posted January 17, 2013 Shame there is now way to do this without editing core files.
AtariAge Posted January 17, 2013 Posted January 17, 2013 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
Recommended Posts
Archived
This topic is now archived and is closed to further replies.