udittmer commented on code in PR #543: URL: https://github.com/apache/jspwiki/pull/543#discussion_r4440968613
########## jspwiki-main/src/main/java/org/apache/wiki/search/LuceneSearchProvider.java: ########## Review Comment: I'm seeing some inconsistent behavior, but I'm not sure if maybe I don't understand how this is supposed to work. If I create a page with the Weblog plugin, it's named something like Weblog_blogentry_021126_1. Searching for `name:blog` finds all blog pages, with relevance of 111. Searching for `name:blog*` also finds all of them, with relevance 100. So the search considers part of the page name - good. Searching for `name:blog*26` finds no pages. Searching for `name:blog*26*` finds all pages with a date that contains 26. So the wildcardquery apparently needs to match the entire page name at the end, although not at the beginning - that is a bit unexpected. Searching for `name:blog*26_*` or `name:blog*26_1` finds no pages. Searching for `name:blogentry*26*` finds all pages with a date that contains 26. Searching for `name:entry*26*` finds no pages - unexpected. I understand that this has to do with the handling of underscores, but it's a bit counterintuitive to me. Also, if the relevance can't easily by scaled to be between 0 and 1, or 0 and 100, maybe it's better to omit entirely, and just show the color bars. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
