Multiple word search in multiple colums
Hi,
I have two databases, the first one contains a series of columns with data, the second one contains several words. I need to perform a search on specific columns of database 1 that contain the key words in database 2
Sample: Refer to image attached.
I can't use the search function as I have more than 10 key words to be search
Hi Brian;
Hi Brian;
Thank you for your answer. I accually was trying to use the @regexpr; however it seems that is matching the characters not only in a column but in each word. e.g. @regexpr(FIRST_NAME, SAM) and is returning all the rows that have samuel as well. Not sure why.
Hi wookeytech,
Hi wookeytech,
You will have to used the search feature for this task. I don't know where you came up with only 1o key words to search. The actual limitation in the search text box is 1000 characters. I ran a test Sample-Employees.IMD file and was able to search for all these first names.
Antonio or Barbara or Brian or Cai or Carlos or Carolyn or Chen or Christina or Cierra or Connie or Crespin or Daniel or Daniella
Notice you have to put the boolean operator or between each of your terms and you do not need to put the search words in quotes as this will just take up characters in your 1,000 character limit. Make sure you have the Use advanced searching features checked and by default this feature will seach for a whole word so if you put Dan, it will not give you Daniel or Daniella.
The time consuming part is building the search string separated by all the or's. One handy thing is you can do this outside of IDEA in a text file or a word document and save it for future use or for adding or removing terms in a subsequent search. The IDEA search text box works with the Windows clip board so you can Ctrl+C from your text file/word document and Ctrl+V in the IDEA search text box.
Good luck with your searches.
Cheers,
Steve
Hello wookeytech,
Hello wookeytech,
I have attached to you three macros.
1. Create a working directory in IDEA
2. Copy the three macros to the work directory
3. Run a_create_SearchWordList.iss, this will create an IDEA table of the keywords.
4. Run b_create_database1.iss, which creates an IDEA table you want to check.
5. Run x_cb_matching_words.iss, this will create the result table of the hits.
Isini is not really useful, since you are also creating a hit when you search for "here" and a word like "there" occurs.
You must separate each word of a string and check for a hit.
Whether for this IDEA is the right tool, I do not judge, since it is very arithmetic, but I think with the solution that I give you here
you should start something.
If you are familiar with IDEA-Script, you can also build a GUI for your keywords and manage them.
Also you can build a GUI, which connects the various search word lists with freely selectable files and you can get targeted results.
Have fun with my scripts and I hope they help you further
Cheers,
Chris
PS:
I use IDEA v8.5 an there the scripts run with no problems.
PPS:
By the way, your question has been very interesting, maybe I can implement something like similar in the future also
Hi wookeytech and welcome to
Hi wookeytech and welcome to the site.
You could do something like this where you use @Isini to search for each of your words. Depending on the number of words this could potentially become a long equation. If you do scripting you could create a script and save the words as a text file, the script would then read the text file with the words and create the equation that way, especially useful if you have different word sets that you need to use. Hopefully this helps you out a bit. Maybe Steve might have another idea on how to do this as he is pretty good with the equation editor.
(@Isini("john", FIRST_NAME) .OR. @Isini("peterson", FIRST_NAME) .OR. @Isini("john", FIRST_NAME)) .AND. (@Isini("john", NAME) .OR. @Isini("peterson", NAME) .OR. @Isini("john", NAME)) .AND. (@Isini("john", ADDRESS) .OR. @Isini("peterson", ADDRESS) .OR. @Isini("john", ADDRESS))