Need help searching for keywords in a text

Hey , I need help on searching keywords in a text . Here is an example ;
Database entries include text holders that are following item1 - ‘text1’ , item 2 - ‘text2 text3’ item 3 ‘text4 text5’

The keywords are ‘text1 text3’ , I want to return item1 and item2 .

Note 1: Contains keywords doesn’t work on this case
Note 2 : A solution is convert both to list and intersect with in advanced filter

Not sure what the conversion and intersection solution is about but TLDR searching multiple keywords should work pretty easily by searching for things containing keyword:split by (" “):first item MERGED with (def not intersected) searching for things containing keyword:split by (” "): item#2 etc

I didn’t understand a thing , What is TLDR ? . Can you give example on this Database entries include text holders that are following item1 - ‘text1’ , item 2 - ‘text2 text3’ item 3 - ‘text4 text5’

The keywords are ‘‘text1’’ text3’’ , want to get item1 and item 2 .

TLDR is top level (overview-ish)

To restate: Search for records containing Keyword 1 Merge with records containing Keyword2.

I think problem is much more complex than that . The real problem is this , I just tried to simplify it but made it worse I guess . each item has category1 and category 2 , and those categories have text values .

Lets say Item 1 - Category 1 is A1 , Category2 is B1 – Item 2 - Category 1 is A1 , Category2 is B2 --Item 3 - Category 1 is A2 , Category2 is B21 – Item 4 - Category 1 is A2 , Category2 is B22

Now user goes in to filter and selects A1 and than A2-B21 , Now we will return all results from category of A1 and only B21 from A2 category ones

So result will be , Item1 , Item2 and Item3

  1. Keywords can be unlimited , around unknown number of keywords
  2. Each category1 has corresponding attributes in category2 , in thise case A1-B1,B2,B3,B4 (can have values) – A2-B21,B22,B33,B44 (can have values )

I cannot understand what on earth the DB setup is. I have tried reading it thru multiple times but still don’t understand.

Def don’t describe it with A1 and A2 and item 1 and item 2 and item 3. Maybe a table of actual data would help?

Either way if you know what field to search it shouldn’t be an issue to get things that have any of the keyword searches.

Yeah it is pretty hard to explain the problem , actual data won’t ease that trust me . I have solved the problem . But the problem is this , for example we are on online dog marketplace to adopt dogs. You filter dogs , you are selecting the type of the dog. You selected dobermann and golden retriever but you also selected from golden retriever choices american type golden retrieever , golden retriever · american . Now I want to show all dobermann ( with every dobermann type ) and only golden retrievers that are american type .

Ok, now I get it. Yeah that is harder to explain than to execute.

You basically ignore the golden retriever keyword IF the keyword contains a golden retriever sub keyword.

Well one of us is highly wrong . Execution of this is really really hard . Let’s assume you can change whatever you like in the data base , originally you have dog type - dobermann and golden here are types and detailed type - golden retriever american . You can set the database as this seperate by dog type and detailed type or you can set type text - ‘golden golden retriever american’ or you can set it as list of text item1 - dog type item 2 - detailed dog type . I believe what you think works doesn’t work , I found a solution that I created a list of text item1 - ‘dog_type_value’ item2 ‘dog_detailed_type’’ and when searching for dogs I used filtered advanced This dogs list of text intersect with [ a list that are dog_type’s that no detail type is chosen + detailed types ] count>0 . If you have simpler solution feel free to help me

I don’t understand what you’ve wrote about the options. Why can’t you just clean up the search input to remove any dog types that also have its sub types within the search?

But if I understood that there’s dog type and dog sub type then what I was saying above was that the search looks for each individual keyword provided that the search input doesnt contain any subtypes for that keyword.
So search for dogs that contans “if keyword #X doesnt have its subs in search input”:formatted as text (keyword #X, “some string that cant be a value in any records”). (And merged with other results for other keywords) Ideally you’d set up the text values to indicate within its text value if its a sub or not.

Also you can then use just one field to capture the primary and sub type (and even sub-sub type)

This topic was automatically closed after 70 days. New replies are no longer allowed.