- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2012 08:37 AM
I've been trying to learn more about the reporting/searching capabilities in Service-Now, and I can't seem to get keywords to work like I'd expect.
Most of it seems okay:
1. If I search for 'reimage' (123TEXTQUERY321=reimage), I find 65 incidents with that word in one of the indexed fields (short description, comments, resolution notes, etc.).
2. If I separately search for 'laptop' (123TEXTQUERY321=laptop), I find 1796 incidents with that word somewhere in the indexed fields.
3. If I search for 'reimage laptop' (123TEXTQUERY321=reimage laptop), I find 34 incidents with both of those words somewhere in the indexed fields.
4. If I search for '"reimage laptop"' (123TEXTQUERY321="reimage laptop"), I find 1 incident with that exact phrase somewhere in the indexed fields.
5. If I search for 'reimage' and 'laptop' (123TEXTQUERY321=reimage^123TEXTQUERY321=laptop), I find 34 incidents with both of those words somewhere in the indexed fields. That still makes sense because it's effectively the same as search #3 above.
These searches all seem fine. The issue comes when I want to effectively search for either 'reimage' OR 'laptop'.
6. If I search for 'reimage' or 'laptop' (123TEXTQUERY321=reimage^OR123TEXTQUERY321=laptop), I still find 34 incidents with both of those words somewhere in the indexed fields. This is where I'd expect to find at least 1796 'laptop' incidents [see search #2 above], plus all of the 'reimage' incidents that don't include 'laptop' anywhere in an indexed field.
It seems like trying to perform an "OR" search in keywords still ends up being an "AND" search. This is consistent between reporting and list searching, and it's the same in both our Aspen Patch 2 Hotfix 5 instances and our Berlin Patch 0 Hotfix 4 instances. Am I doing something wrong, or is this possibly a bug/limitation?
Solved! Go to Solution.
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2012 08:43 AM
While I'd still expect the behavior to be different when you actually include multiple "Keywords are" lines in your filter, it looks like I can achieve OR searching by just using a boolean operator: http://wiki.servicenow.com/index.php?title=Introduction_to_Searching#Boolean_Operators
To continue with my numbering above:
7. If I search for 'reimage | laptop' (123TEXTQUERY321=reimage | laptop), I find 1827 incidents, most likely with either 'reimage' or 'laptop' somewhere in the indexed fields. Success!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2012 08:43 AM
While I'd still expect the behavior to be different when you actually include multiple "Keywords are" lines in your filter, it looks like I can achieve OR searching by just using a boolean operator: http://wiki.servicenow.com/index.php?title=Introduction_to_Searching#Boolean_Operators
To continue with my numbering above:
7. If I search for 'reimage | laptop' (123TEXTQUERY321=reimage | laptop), I find 1827 incidents, most likely with either 'reimage' or 'laptop' somewhere in the indexed fields. Success!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-09-2018 02:22 PM
Just make sure you put spaces between the pipe operator |
Keywords = reimage | laptop
It will not work if you have something like this:
Keywords = reimage|laptop
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2012 07:06 AM
The proposed workaround is good for situations when you need to join two Keywords searches using the OR operator. But what if you need to search for something like this:
(Short Description CONTAINS network) OR (Keywords ARE server)
If you build a filter like this in a list of records, it is not going to work as expected. Unfortunately, ServiceNow do not even think it is a problem. Here is what they replied when I reported this as a bug:
[quote]A Keywords filter using the top-level OR condition has never been supported, even though the Keywords option wrongly still remained visible when building such a filter.[/quote]
Two years have passed since then but the problem is still there... 😞
Blog: https://sys.properties | Telegram: https://t.me/sys_properties | LinkedIn: https://www.linkedin.com/in/slava-savitsky/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2017 09:32 AM
I realize this is years old, but review section 6 in the
Introduction to Searching
: http://wiki.servicenow.com/index.php?title=Introduction_to_Searching#Boolean_Operators&gsc.tab=0
To effectively use a keyword search, the condition should be "Keywords -- are -- WordA | WordB"