- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2020 07:19 AM
Hi
I would like to be able to make a search from my case form, backoffice, with two parameters: short description, and product.
Looking at the url page syntax, I don't think I can use parameters to do this.
Before starting a big development/customization, I would like to know if at least it is possible to make the search look for the whole short description as one string, and not only for each word of the short description separately.
I mean I would like to search for "Product module update" instead of "Product", "module", and "update" separately.
Any help would be greatly appreciated!
Thank you
Regards
Emmanuel
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2020 09:17 AM
With IR_AND_OR_QUERY operator you are currently using, you should have the desired behavior by default. This search operator forces the system to first try to find articles matching all search terms and only if this attempt fails, fetch articles that match some of the search terms. Refer to this article to learn more about this and other available search operators.
Another possibility is to use the exact phrase search feature. To search for an exact phrase, just put quotation marks around it.
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
03-19-2020 09:17 AM
With IR_AND_OR_QUERY operator you are currently using, you should have the desired behavior by default. This search operator forces the system to first try to find articles matching all search terms and only if this attempt fails, fetch articles that match some of the search terms. Refer to this article to learn more about this and other available search operators.
Another possibility is to use the exact phrase search feature. To search for an exact phrase, just put quotation marks around it.
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
03-19-2020 10:13 AM
Hi Slava
Many thanks for your answer! Of course, using the double-quotes I am able to search for several expressions. Which looks enough for my current needs as the results quality (sorting) looks fine.
The ideal solution would be to be able to map each term to a property field of the articles, but for now it looks fine for my immediate need.
I also use the sys_nav_count argument in the URL for pagination, but I was wondering if there is also a parameter to limit the total number of articles returned ? In fact, I just need the first 5 articles, and I would like to avoid the display of the "Your search returned too many results pleas refine" message.
Do you know if such parameter exists ?
Thank you again for your answer
Best regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2020 09:05 AM
I assume you are using Knowledge Management v2. If that is the case, you could limit the number of results returned by KB search using "glide.knowman.search.rowcount" system property.
To get rid of the annoying info message, trying commenting out the following block of code inside "kb_search_results" UI macro:
<div class="outputmsg_div">
<div class="outputmsg outputmsg_info"><img class="outputmsg_image" src="images/outputmsg_info_24.gifx" title="Informational Message"/>
<div class="outputmsg_text">${gs.getMessage("Your search returned too many results - please refine your search terms.",al)}</div>
</div>
</div>
Blog: https://sys.properties | Telegram: https://t.me/sys_properties | LinkedIn: https://www.linkedin.com/in/slava-savitsky/