[ 
https://issues.apache.org/jira/browse/JSPWIKI-1321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18138760#comment-18138760
 ] 

Arturo Bernal commented on JSPWIKI-1321:
----------------------------------------

[~udittmer], thanks for the answer in pull request 575. The scope is smaller 
now, as discussed there: a search keeps starting at the beginning of a word, so 
name:entry, name:entry* and name:entry*26 find nothing, and the part of the 
pull request that looked inside the words of a name is removed.

The change is that in a page name term with a * between other characters, the * 
at the end is optional: name:blog*26 is read as name:blog*26*. The relevance of 
a result is still scaled so that the best one is 100.

In SearchManagerTest, with the pages Weblog_blogentry_021126_1, 
Weblog_blogentry_031226_1, Weblog_blogentry_021127_2 and Man_Page, name:blog*26 
and name:blog*26* both find the first two, name:blog*27 finds the third, 
name:blog*99 finds nothing, and name:man* finds only Man_Page. The new test for 
the optional * fails with the code of master (name:blog*26 finds nothing) and 
passes with the change; the 16 tests of SearchManagerTest pass. Not run: the 
whole test suite, and a wiki with the Weblog plugin. The summary of this issue 
is updated; the description is the original one.

> A wildcard in the middle of a page name search term needs a * at its end to 
> find the name, and the relevance goes above 100
> ---------------------------------------------------------------------------------------------------------------------------
>
>                 Key: JSPWIKI-1321
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-1321
>             Project: JSPWiki
>          Issue Type: Improvement
>            Reporter: Arturo Bernal
>            Priority: Minor
>              Labels: pull-request-available
>
> Follow-up of JSPWIKI-501 (pull request 543), from the review of Ulf Dittmer.
> For a page named Weblog_blogentry_021126_1, the provider indexes in the field 
> name the tokens weblog, blogentry_021126_1, weblog, blogentry, 021126 and 1 
> (measured with ClassicAnalyzer on the text the provider builds for that 
> field). A wildcard term is matched inside one token. Measured on an in-memory 
> index with seven page names, with the behaviour of master and of the branch 
> of pull request 543:
> * name:blog*26 finds nothing
> * name:entry*26* finds nothing
> * name:man* finds only Man_Page, not Human_Page or Woman_Page
> The reviewer expects the first two to find the page, and said that 
> name:blog*26 finding nothing while name:blog*26* finds pages is unexpected.
> A second point from the same review: the relevance of a result is the Lucene 
> score multiplied by 100 with no maximum, so values above 100 appear (108 and 
> 255 were measured on the branch of pull request 543). The reviewer suggested 
> scaling it to 0-100 or leaving it out.
> Not measured yet: the effect on searches in the page contents, and the cost 
> of terms that begin with a wildcard.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to