Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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;
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
Hi,
Use match() or wildmatch()
try like
wildmatch(fieldname,'*AUTO*','*COGS*','*DAL*')
Regards
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
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,
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