Jump to content

Search: Please provide option to AND together search terms, not OR


AtariAge

Recommended Posts

I ask Invision (Matt!): Can you please add an ACP option to the search system so that search terms are AND'ed together instead of using OR? I have nearly 2 million posts on my forum. Many searches simply return too many search results because of this default behavior, and I bet 98% of my users have no idea they need to prefix search terms with "+" in order to AND them together.

I modified 2.3 in order to make this AND behavior the default default, but the more complex search system in 3.0 frightens me a bit in terms of making modifications. I already made one modification (to add a "My Posts" query that shows any threads you have posted in, returning titles only, something still missing from IP.Board) and I had to step very carefully to get that to work.

Thanks for your consideration, it would make me and my users very happy. :)

..Al

Link to comment
Share on other sites


I ask Invision (Matt!): Can you please add an ACP option to the search system so that search terms are AND'ed together instead of using OR? I have nearly 2 million posts on my forum. Many searches simply return too many search results because of this default behavior, and I bet 98% of my users have no idea they need to prefix search terms with "+" in order to AND them together.



I modified 2.3 in order to make this AND behavior the default default, but the more complex search system in 3.0 frightens me a bit in terms of making modifications. I already made one modification (to add a "My Posts" query that shows any threads you have posted in, returning titles only, something still missing from IP.Board) and I had to step very carefully to get that to work.



Thanks for your consideration, it would make me and my users very happy. :)



..Al




I may be wrong in this, but the only way you can do this is by modifying the search term before it's used. And that in itself can be a bit difficult considering you have any combination of > < ~ - + that can preceded a word, words can be wrapped in quotes (the character would come before the quote) and then you can have parenthesis for a sub expression. And I'm not really sure how you should treat other characters like periods, etc... I think any non-letter character is treated as space (which it depends on the language).

So even if you could assume for a moment that the language is English and correctly add a "+" before each word that does not have something in-front of it already, you have to consider that other languages work differently, and IPS could not implement something that was language dependent.

Also something else to consider: Fulltext has a 3 character limit, and really isn't that efficient anyway (it is compared to col LIKE '%blah%'). On top of that, there is a long list of stop words that are ignored. Your best bet is to use something like spynx if you want more accurate results.

There may or may not be a MySQL setting to change the default behavior. I haven't found it (yet). If there is, you may be able to set it on a per-connection basis.
Link to comment
Share on other sites

I am using Sphinx, which gives me better results than MySQL's fulltext search, but still not ideal. I need to spend some additional time testing it, but I have many users complaining about the search right now, compared to my 2.3.6 forum (where I was also using Sphinx). At some point when I was running 2.x I modified the forum to default search terms to AND together, and I believe this was before I moved to Sphinx. This provided much better results and made the search more user friendly, which is what we all want, right?

With Sphinx I'm running a 2-character minimum search term, which is great. Not sure how many stop words there are relative to MySQL, but it's not something I've run into on my forum. I run into it all the time here, though, which is annoying (don't get me started on how aggravating it is to do searches on this forum).

..Al

Link to comment
Share on other sites

  • 1 month later...

Hi Matt,


It's on my list for 3.1. We did this for 2.3.6 if I recall correctly.



How high is this feature (to provide an automatic "AND" to the search terms) for 3.1?

I'm finding that using the current search engine here on community.invisionpower.com to be quite cumbersome at best, and find myself using "site:community.invisionpower.com" plus the search terms on Google a lot more often. I'm afraid the same sort of problems will exist under my IP.B installation and users will find using its search to be cumbersome as well, especially coming from vB. I believe that having a default "AND" operation for the search terms would alleviate some of the problems that I foresee...

Thank you!
Link to comment
Share on other sites


I'm finding that using the current search engine here on community.invisionpower.com to be quite cumbersome at best, and find myself using "site:community.invisionpower.com" plus the search terms on Google a lot more often. I'm afraid the same sort of problems will exist under my IP.B installation and users will find using its search to be cumbersome as well, especially coming from vB. I believe that having a default "AND" operation for the search terms would alleviate some of the problems that I foresee...



Unfortunately, using an external search does not help when you need to search forums that only customers have access to. I'm hoping we see a Blog post in the near future about the planned search improvements for 3.1. :)

..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...