Itās not fun if it isnāt a challenge.
with you itās always a challenge
Hi, I am sure that we can have something much more smart & accurate.
As a temporary solution, if the approach with a Single value & Template column use an Inline list filtered with āIncludesā (or is included in), doesnāt it partly solve the AND-OR search?
If Iām understanding @POWH_RPSās request, they want to be able to type in multiple words and primarily, the search would return any matches where either, one of the words finds a matche, OR the other word finds a matche. Ideally an AND would also require all words to be found in a match, but would not require the words to be next to each other or in the same order in the searched text. If I understand your template and single value approach, it will search for any match within the template, but isnāt it true that the entire search string would have to find a match? So if I have a search of three words, all three would have to be found, in the same order, and next to each other in the text being searched. This is exactly what the built in search does already.
Right. Glide just needs to improve their search bar functionality.
Cool ! I can apply to be a Glide developer
More seriously, based on your comments, I have to review how exactly my Template/SV approach delivers (once I enter some raw data to test it more deeply)
[EDIT] It is indeed an āANDā, and itās logic āis included inā is like AND ā¦ Sorry @POWH_RPS, it does not answer your need. Thanks @Jeff_Hager for pointing out the issue
Very interesting indeed! This would do what I am looking for. Can you share this last app?
Thanks.
After some working, I have solved my issue and created a much more powerful search tab. This has been realized by making the heavy lifting using Google Sheet functions, and organizing the tables in a Glide usable manner.
It is a little long to explain, but the concepts are the following:
I have created a new tab in GS to collect the search sentence that I can enter in Glide using a ātext entryā field; in this tab, I have SPLIT the sentence into the various words and created a list of keywords, with a good measure of placing ā*ā before and after the split word. These keywords with * wildcards now represent my search terms.
In the main data tab in GS, I have created 7 new columns (as I have limited to 7 words the advanced search) and I have used a mix of IF and MATCH functions to spit out āOKā if I find a match of the search keywords within the row. Obviously, I repeat this on all the 7 columns for all the 7 keywords I have created. I have used a preliminary IFERROR function to create a blank result if the formula gives an error (N/A). Useful to know that the MATCH function recognizes the * wildcard symbol.
Done that, I have created a new column in the main data GS tab, called āSelection ORā. In this, using and IF/AND combination, I have generated āOKā whenever I had at least one OK in the previous 7 columns of MATCH.
To conclude, I have created in Glide, in a dedicated details tab: a text entry to write the user search terms, an inline list filtered for the āSelection ORā column, et voila, OR search is served.
I have also gone further in creating a Glide selector to use AND or OR to combine the search term and filtered a āSelection ANDā column created in a similar manner, so to have an inline list this time filtered to an AND criterium. So now I also have an AND search available.
It took some time and is definitely not elegant.
Iād much more prefer Glide to directly provide a more powerful search bar and close the deal!!!
Also because, I just realized, this convoluted trick DOES NOT allow to make user specific columns. So in the end also this does not really workā¦
Hello @Jeff_Hager
I would like a clarification for your challenge
the words between āā are obligatory or exact, because it is not at all the same thing and the principle of research ??
If it is mandatory, the optional criteria are not necessary, but if it is optional, then we can make an āand / orā
Hello @POWH_RPS
For the moment, it is still in the prototype phase, but I will make a point if I manage to finish.
Hello,
With a little free time, I try to meet the challenge.
On the same approach as the āGoogleā search.
Criterion :
āRequired wordā Optional word
The order doesnāt matter.
I added the āWordā options for a whole or partial word (partial useful when searching with an inline-list), āIgnore Accentā option (for Latin people), āuppercaseā option
I made a return as a string instead of the boolean, maybe easier for integration to a result array or whatever.
If the tests are good I will do a version for a search with an array or a joinlist, can this be useful?
The code isnāt very clean and not super nice, but it obviously works (well for now).
If you want to do some tests on one of your tables, here is the link for YC:
https://Search-V2.manun2.repl.co
Here is a demonstration, 1 Text tab & 1 tab with an inline-list
Looking forward to your comments.
Iām thinking the use of āā would eliminate the need for a separate and/or indicator, which you already did. It would also make the words contained within the double quotes obligatory and exact.
For example, in google you can search for:
this becomes that
This would return results that contain this or becomes or that. Obviously with more advanced ranking that places priority on those results that contain the exact phrase or all of the words, but I donāt think we are worrying about that here.
If you search for:
āthisā becomes that
Then it would return results that must contain this. As I type this and think about it more, Iām not sure if the inclusion of becomes or that should give results that contain this AND (becomes OR that) or if it should treat it like (this OR becomes OR that). It looks like you have it set up the second way, so all results must contain this to be true and the rest of the words are essentially ignored since it found a match for this.
If you search for:
āthis becomesā that
Then it would return results that must contain this becomes as a phrase, but as I indicated above, your code kind of ignores that since any results must contain this becomes. Should it really be (this becomes AND that) or just ignore that like it is now, since it found a match for this becomes?
If you search for:
āthis becomes thatā
Then the entire phrase must find a match.
I would be curious what other peopleās opinions are on combining words or phrases in double quotes with words that are not in double quotes. Should at least one of the words that do not have double quotes be included in the search results, or not? I realize that adds a whole new level of complexity, but Iām not sure what the correct answer is. I think what you have right now looks really good though and works how I had expected it to work.
I passed the challenge then!
@Manu.n I have tried your text search and it looks GREAT! At least from my way of testing itā¦
It is really intuitive and I could not fault it. I like the use of āā to search for exact correspondence of that letter sequence (right?). A couple of questions:
- I have noticed that your other tab (search inline list V2) only search within the titles of the elements, not on the whole row of data (e.g. email address). Is this correct? Could the text search be performed on all the row elements (i.e. across all the columns)? I imagine that having a last ātemplateā cell joining together all the previous cell contents would do the trickā¦
- Are the āsearch textā field and other needed columns user specific? In other words, can different users make different searches and obtain different inline list results?
Hello @POWH_RPS
None of your questions can fit into the Experimentale column, but you can do so with:
-
to do a search on several columns, you must before doing a template column group together the data to be searched
-
For the search to be specific to the user, you must do a āsearchā column with the option āuser-specificā
I am preparing a final version for today (I think).
VERSION 2 Here