Hi,
close/delete this topic please.... i made a huge mistake ;]tl:dr
user input search string
eni enigmacurrent solution:
returns only posts including
BOTH words: eni
AND enigma
my proposal:
keep current search as it is right now
but alsoallow ( ) operator to make search string like:
(eni enigma)would return all posts including
ANY word: eni
OR enigma
I will write it as short as i can

search is seeking for specific strings through post title and content
You can:1. Search through specific words/strings, like
eni,
enigma or
base, etc..
2. As far as i know you can search through strings like
"eni mp" - this will consider ONLY entire string in provided order
3. If you specify many words in one search queue, for example:
enigma dusk 15ed your search results gonna have all of the words but not 100% quite what you asked for

For example you can get result (that is just ONE post) as follows:
Quote
topic: My offer list
Content:
-mp enigma base 3os
-dusk coh 12%
-eth kraken shell 4os 15ed
Quote
tech jibba jabba for devs only:
So...
Specyfying more than one word in search phrase makes (i simplify it to 'post_content' column only) queues +/- like this:
Code
SELECT * FROM posts WHERE contents LIKE "%enigma%" [B]AND [/B]contents LIKE "%dusk%" [B]AND [/B]contents LIKE "%15ed%"
This returns every post containing those three words, but it does not really give user right he/she expected :)
Obviously as i said you could put your search string in " ", making it:
"enigma dusk 15ed" but that is not going to work just as well...
What if some user uses
eni not
enigma word in his/hers post?
So
the way it works now if you want to search for exact perfect result of
enigma dusk 15ed you have to do multiple searches:
1) "enigma dusk 15ed"
2) "eni dusk 15ed"
3) "eni ds 15% ed"
4) "enigma ds 15ed"
... and we could probably find 20-30 more variations and combinations

This is a huge problem.
many people add tags to their posts to get around this problem and make their posts more visible to higher population
You can NOT:1.
That is the idea here - search for many alternative words in just one search query -
to introduce such mechanismSo let's make a simplification of previous example, and assume that someone wants
to search trade forum just for a random 3 socket AP/MP/DS enigma base.
Now search strings that user input would looks like this:
Quote
1a) "3os archon plate"
1b) "3os ap"
1c) "3os archon plate"
1d) "3 soc archon plate"
1e) ...
1f) ...
1g) "3soc archon plate"
....
1x) "archon plate 3sox"
1y) "archon plate 3os"
1z) "archon plate 3 os"
well, let's say the list of variations is HUGE.... and that's just for archon plate :banana:
let's continue... shall wel?
2a) "3os mage plate"
2b) "3os mp"
...
2z) "mage plate 3 os"
3a) "3os dusk"
3b) "3os ds"
.... etc....
3z) "dusk shroud 3 os"
that is a quite huge list of search attempts one have to do to seek through all variations and possibilities....
I think current solution is far from perfect, and it can be adjusted VERY quickly.
So my idea is to introduce simple mechanism, that will allow that in just one simple search.Simply add/allow brackets in search string ( ) that user inputs, then parse it on server accordingly.
Every word in brackets (eni enigma) shall be searched with SQL OR operator.
For example search string (from point
can not 1. above)
to search trade forum for random 3 socket AP/MP/DS enigma baseinstead of that huge long list of many search strings, you could just use one that would look lke this:
(dusk ds ap mp "archon plate" "mage plate") (3sox 3os 3sox 3soc "3 sox" "3 os" "3 sox" "3 soc")Well, it requires some more typing from users, but overall it will benefit everyone

users getting results in just one search, and server performing just one query instead of 1000 ;]
Quote
tech jibba jabba again for devs only:
( ) in user input would make equivalent of OR in server SQL query, so query would look +/- like this now:
Code
SELECT * FROM posts WHERE
(contents LIKE "%dusk%" OR contents LIKE "%ds%" OR contents LIKE "%ap%" OR contents LIKE "%archon plate%" OR contents LIKE "%mp%" OR contents LIKE "%mage plate%")
AND
contents IN ("3sox", "3os", "3sox", "3soc", "3 sox", "3 os", "3 sox", "3 soc")
hope i did not make any typo ;]
Tell me what you think

ps. similar solution works well on at least one of auction sites i know
This post was edited by Arassuil on Dec 22 2021 10:06pm