Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Is it possible to search multiple key words at same time?

Is it possible to search multiple key words at same time?

In my QVD text field, I have 3 search terms. 1. AUTO 2. COGS 3.DAL.   These search terms are in middle of the big string text.

My requirement is search a key word in Text and find 500 characters before and after key word.

Via below query, I was able to search one key word successfully.

The question is ….Is it possible to add other key word in same query without repeating the same process with 2nd key word?

LOAD

*,
mid(Review,index( upper(Review), 'AUTO' ),500)  as Mid_Example_Plus,
 
mid(Review,index( upper(Review), 'AUTO' ) -500,500)  as Mid_Example_Minus,        
       index( upper(Review), 'AUTO' ) as index_example

RESIDENT Reviews
WHERE index( upper(Review), 'AUTO' ) > 0;

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

In the example I supplied add, the end of the script.

// Delete Reviews that don't have any keywords

INNER JOIN (Reviews)

LOAD ReviewId

RESIDENT Keywords2

;

Adapt to your specific script.

-Rob

http://masterssummit.com

http://robwunderlich.com

View solution in original post

4 Replies
PrashantSangle

Hi,

Use match() or wildmatch()

try like

wildmatch(fieldname,'*AUTO*','*COGS*','*DAL*')

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I've adapted a QlikViewCookbook.com example that indexes keywords to extract the range of 5 characters before and after the Keyword as an Excerpt field. Example attached, see if you can adapt it to your needs.

-Rob

http://masterssummit.com

http://robwunderlich.com

Not applicable
Author

This is wonderful and did work. Is there way I filter just extract only 'key word' match records? Now I am seeing all records. I just want to see only matched records and discard 'non-match records'. Is it possible?

Thanks,

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

In the example I supplied add, the end of the script.

// Delete Reviews that don't have any keywords

INNER JOIN (Reviews)

LOAD ReviewId

RESIDENT Keywords2

;

Adapt to your specific script.

-Rob

http://masterssummit.com

http://robwunderlich.com