[jira] [Commented] (SOLR-2533) Improve API of ValueSource FunctionQuery SortField weighting
[ https://issues.apache.org/jira/browse/SOLR-2533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13051855#comment-13051855 ] Simon Willnauer commented on SOLR-2533: --- there seems to be a problem with the CHANGES.txt changes in your patch. Intuitively I would say this needs to go into solr/CHANGES.TXT and it should not remove an existing entry no? Improve API of ValueSource FunctionQuery SortField weighting -- Key: SOLR-2533 URL: https://issues.apache.org/jira/browse/SOLR-2533 Project: Solr Issue Type: Improvement Components: search Reporter: Chris Male Assignee: Chris Male Attachments: SOLR-2533.patch, SOLR-2533.patch, SOLR-2533.patch, SOLR-2533.patch Started from LUCENE-2883: Support for sorting by ValueSource and FunctionQueries is done through ValueSource#getSort and the ValueSourceSortField. In order to support VSs containing other Queries, its necessary to allow the Querys to be weighted by an IndexSearcher. Currently this is handled by having ValueSourceSortField implement SolrSortField. In Solr's SolrIndexSearcher, SortFields implementing SolrSortField are then weighted before the Sort is used. Sorting by FunctionQuery and ValueSource are invaluable and will become available to all Lucene users in LUCENE-2883. But in order to do so, we need to remove the coupling of this functionality to Solr, and make it more standard. Any and all thoughts about how to do this are appreciated. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-2533) Improve API of ValueSource FunctionQuery SortField weighting
[ https://issues.apache.org/jira/browse/SOLR-2533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13038266#comment-13038266 ] Michael McCandless commented on SOLR-2533: -- Chris now that you are committer you should assign this to yourself and commit it :) Then we can keep going on LUCENE-2883! Improve API of ValueSource FunctionQuery SortField weighting -- Key: SOLR-2533 URL: https://issues.apache.org/jira/browse/SOLR-2533 Project: Solr Issue Type: Improvement Components: search Reporter: Chris Male Assignee: Michael McCandless Attachments: SOLR-2533.patch, SOLR-2533.patch, SOLR-2533.patch Started from LUCENE-2883: Support for sorting by ValueSource and FunctionQueries is done through ValueSource#getSort and the ValueSourceSortField. In order to support VSs containing other Queries, its necessary to allow the Querys to be weighted by an IndexSearcher. Currently this is handled by having ValueSourceSortField implement SolrSortField. In Solr's SolrIndexSearcher, SortFields implementing SolrSortField are then weighted before the Sort is used. Sorting by FunctionQuery and ValueSource are invaluable and will become available to all Lucene users in LUCENE-2883. But in order to do so, we need to remove the coupling of this functionality to Solr, and make it more standard. Any and all thoughts about how to do this are appreciated. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-2533) Improve API of ValueSource FunctionQuery SortField weighting
[ https://issues.apache.org/jira/browse/SOLR-2533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13037518#comment-13037518 ] Chris Male commented on SOLR-2533: -- I agree with Yonik's thoughts here, we really want to limit the effect on the overall API since currently its just for FunctionQuerys. I will create a patch along those lines. Improve API of ValueSource FunctionQuery SortField weighting -- Key: SOLR-2533 URL: https://issues.apache.org/jira/browse/SOLR-2533 Project: Solr Issue Type: Improvement Components: search Reporter: Chris Male Started from LUCENE-2883: Support for sorting by ValueSource and FunctionQueries is done through ValueSource#getSort and the ValueSourceSortField. In order to support VSs containing other Queries, its necessary to allow the Querys to be weighted by an IndexSearcher. Currently this is handled by having ValueSourceSortField implement SolrSortField. In Solr's SolrIndexSearcher, SortFields implementing SolrSortField are then weighted before the Sort is used. Sorting by FunctionQuery and ValueSource are invaluable and will become available to all Lucene users in LUCENE-2883. But in order to do so, we need to remove the coupling of this functionality to Solr, and make it more standard. Any and all thoughts about how to do this are appreciated. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-2533) Improve API of ValueSource FunctionQuery SortField weighting
[ https://issues.apache.org/jira/browse/SOLR-2533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13037553#comment-13037553 ] Michael McCandless commented on SOLR-2533: -- OK, I agree: let's not make this strongly typed. So, this 'weighting' is more like Query.rewrite than Query.weight, right? Ie, if it needs to, it returns a new Query that compiled in something about the top searcher it was passed. If it doesn't need to, it returns itself? Patch looks great Chris! Except I wonder if we should rename weight to rewrite, or something else... (compile? compileSearcher?)? Improve API of ValueSource FunctionQuery SortField weighting -- Key: SOLR-2533 URL: https://issues.apache.org/jira/browse/SOLR-2533 Project: Solr Issue Type: Improvement Components: search Reporter: Chris Male Attachments: SOLR-2533.patch Started from LUCENE-2883: Support for sorting by ValueSource and FunctionQueries is done through ValueSource#getSort and the ValueSourceSortField. In order to support VSs containing other Queries, its necessary to allow the Querys to be weighted by an IndexSearcher. Currently this is handled by having ValueSourceSortField implement SolrSortField. In Solr's SolrIndexSearcher, SortFields implementing SolrSortField are then weighted before the Sort is used. Sorting by FunctionQuery and ValueSource are invaluable and will become available to all Lucene users in LUCENE-2883. But in order to do so, we need to remove the coupling of this functionality to Solr, and make it more standard. Any and all thoughts about how to do this are appreciated. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-2533) Improve API of ValueSource FunctionQuery SortField weighting
[ https://issues.apache.org/jira/browse/SOLR-2533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13037558#comment-13037558 ] Chris Male commented on SOLR-2533: -- bq. So, this 'weighting' is more like Query.rewrite than Query.weight, right? bq. Except I wonder if we should rename weight to rewrite Yeah I totally agree. The fact that ValueSources use to weight inner Queries is actually an implementation detail and even then it does a rewrite too. I think for consistency with Query, we should go with rewrite. I'll regenerate the patch. Improve API of ValueSource FunctionQuery SortField weighting -- Key: SOLR-2533 URL: https://issues.apache.org/jira/browse/SOLR-2533 Project: Solr Issue Type: Improvement Components: search Reporter: Chris Male Attachments: SOLR-2533.patch Started from LUCENE-2883: Support for sorting by ValueSource and FunctionQueries is done through ValueSource#getSort and the ValueSourceSortField. In order to support VSs containing other Queries, its necessary to allow the Querys to be weighted by an IndexSearcher. Currently this is handled by having ValueSourceSortField implement SolrSortField. In Solr's SolrIndexSearcher, SortFields implementing SolrSortField are then weighted before the Sort is used. Sorting by FunctionQuery and ValueSource are invaluable and will become available to all Lucene users in LUCENE-2883. But in order to do so, we need to remove the coupling of this functionality to Solr, and make it more standard. Any and all thoughts about how to do this are appreciated. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-2533) Improve API of ValueSource FunctionQuery SortField weighting
[ https://issues.apache.org/jira/browse/SOLR-2533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13037561#comment-13037561 ] Michael McCandless commented on SOLR-2533: -- Looks great -- I think it's ready to commit. Can you add a CHANGES? Improve API of ValueSource FunctionQuery SortField weighting -- Key: SOLR-2533 URL: https://issues.apache.org/jira/browse/SOLR-2533 Project: Solr Issue Type: Improvement Components: search Reporter: Chris Male Attachments: SOLR-2533.patch, SOLR-2533.patch Started from LUCENE-2883: Support for sorting by ValueSource and FunctionQueries is done through ValueSource#getSort and the ValueSourceSortField. In order to support VSs containing other Queries, its necessary to allow the Querys to be weighted by an IndexSearcher. Currently this is handled by having ValueSourceSortField implement SolrSortField. In Solr's SolrIndexSearcher, SortFields implementing SolrSortField are then weighted before the Sort is used. Sorting by FunctionQuery and ValueSource are invaluable and will become available to all Lucene users in LUCENE-2883. But in order to do so, we need to remove the coupling of this functionality to Solr, and make it more standard. Any and all thoughts about how to do this are appreciated. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-2533) Improve API of ValueSource FunctionQuery SortField weighting
[ https://issues.apache.org/jira/browse/SOLR-2533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13037565#comment-13037565 ] Michael McCandless commented on SOLR-2533: -- I plan to commit this soon. Improve API of ValueSource FunctionQuery SortField weighting -- Key: SOLR-2533 URL: https://issues.apache.org/jira/browse/SOLR-2533 Project: Solr Issue Type: Improvement Components: search Reporter: Chris Male Assignee: Michael McCandless Attachments: SOLR-2533.patch, SOLR-2533.patch Started from LUCENE-2883: Support for sorting by ValueSource and FunctionQueries is done through ValueSource#getSort and the ValueSourceSortField. In order to support VSs containing other Queries, its necessary to allow the Querys to be weighted by an IndexSearcher. Currently this is handled by having ValueSourceSortField implement SolrSortField. In Solr's SolrIndexSearcher, SortFields implementing SolrSortField are then weighted before the Sort is used. Sorting by FunctionQuery and ValueSource are invaluable and will become available to all Lucene users in LUCENE-2883. But in order to do so, we need to remove the coupling of this functionality to Solr, and make it more standard. Any and all thoughts about how to do this are appreciated. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-2533) Improve API of ValueSource FunctionQuery SortField weighting
[ https://issues.apache.org/jira/browse/SOLR-2533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13037389#comment-13037389 ] Chris Male commented on SOLR-2533: -- How would we expose that, through Sort and just directly on SortField? Currently Solr iterates over the SortFields in a Sort and weights each of them if necessary. Weighting then creates new SortFields which are stored in a new Sort. So essentially the initial Sort is being used as a factory to create this new weighted Sort of weighted SortFields. So we could go down a line similar to that of Query/Weight/Scorer and have something like SortField which produce WeightedSortField which then create FieldComparators. Improve API of ValueSource FunctionQuery SortField weighting -- Key: SOLR-2533 URL: https://issues.apache.org/jira/browse/SOLR-2533 Project: Solr Issue Type: Improvement Components: search Reporter: Chris Male Started from LUCENE-2883: Support for sorting by ValueSource and FunctionQueries is done through ValueSource#getSort and the ValueSourceSortField. In order to support VSs containing other Queries, its necessary to allow the Querys to be weighted by an IndexSearcher. Currently this is handled by having ValueSourceSortField implement SolrSortField. In Solr's SolrIndexSearcher, SortFields implementing SolrSortField are then weighted before the Sort is used. Sorting by FunctionQuery and ValueSource are invaluable and will become available to all Lucene users in LUCENE-2883. But in order to do so, we need to remove the coupling of this functionality to Solr, and make it more standard. Any and all thoughts about how to do this are appreciated. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-2533) Improve API of ValueSource FunctionQuery SortField weighting
[ https://issues.apache.org/jira/browse/SOLR-2533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13037401#comment-13037401 ] Chris Male commented on SOLR-2533: -- Or we could just go for something simpler I guess, and basically borrow the same idea and add weight(IndexSearcher) to Sort SortField which then returns a new Sort if any SortField changes. Improve API of ValueSource FunctionQuery SortField weighting -- Key: SOLR-2533 URL: https://issues.apache.org/jira/browse/SOLR-2533 Project: Solr Issue Type: Improvement Components: search Reporter: Chris Male Started from LUCENE-2883: Support for sorting by ValueSource and FunctionQueries is done through ValueSource#getSort and the ValueSourceSortField. In order to support VSs containing other Queries, its necessary to allow the Querys to be weighted by an IndexSearcher. Currently this is handled by having ValueSourceSortField implement SolrSortField. In Solr's SolrIndexSearcher, SortFields implementing SolrSortField are then weighted before the Sort is used. Sorting by FunctionQuery and ValueSource are invaluable and will become available to all Lucene users in LUCENE-2883. But in order to do so, we need to remove the coupling of this functionality to Solr, and make it more standard. Any and all thoughts about how to do this are appreciated. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-2533) Improve API of ValueSource FunctionQuery SortField weighting
[ https://issues.apache.org/jira/browse/SOLR-2533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13037476#comment-13037476 ] Michael McCandless commented on SOLR-2533: -- I guess add Sort.weight? And we should strongly type it, I think? Ie it returns a WeightedSort? (So we don't have to do instanceof checks). But maybe then the SortField within the Sort don't need a new class...? Not sure. And IndexSearcher, before using the Sort, would weight it. Improve API of ValueSource FunctionQuery SortField weighting -- Key: SOLR-2533 URL: https://issues.apache.org/jira/browse/SOLR-2533 Project: Solr Issue Type: Improvement Components: search Reporter: Chris Male Started from LUCENE-2883: Support for sorting by ValueSource and FunctionQueries is done through ValueSource#getSort and the ValueSourceSortField. In order to support VSs containing other Queries, its necessary to allow the Querys to be weighted by an IndexSearcher. Currently this is handled by having ValueSourceSortField implement SolrSortField. In Solr's SolrIndexSearcher, SortFields implementing SolrSortField are then weighted before the Sort is used. Sorting by FunctionQuery and ValueSource are invaluable and will become available to all Lucene users in LUCENE-2883. But in order to do so, we need to remove the coupling of this functionality to Solr, and make it more standard. Any and all thoughts about how to do this are appreciated. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-2533) Improve API of ValueSource FunctionQuery SortField weighting
[ https://issues.apache.org/jira/browse/SOLR-2533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13037488#comment-13037488 ] Yonik Seeley commented on SOLR-2533: The query.rewrite model isn't strongly typed and seems to work fine. The advantaged is that 99% of the time the SortField will remain unchanged (and the base-class implementation of return this will be used). That's much less of an API change too (rather than moving a whole bunch of Sort methods to WeightedSort). Improve API of ValueSource FunctionQuery SortField weighting -- Key: SOLR-2533 URL: https://issues.apache.org/jira/browse/SOLR-2533 Project: Solr Issue Type: Improvement Components: search Reporter: Chris Male Started from LUCENE-2883: Support for sorting by ValueSource and FunctionQueries is done through ValueSource#getSort and the ValueSourceSortField. In order to support VSs containing other Queries, its necessary to allow the Querys to be weighted by an IndexSearcher. Currently this is handled by having ValueSourceSortField implement SolrSortField. In Solr's SolrIndexSearcher, SortFields implementing SolrSortField are then weighted before the Sort is used. Sorting by FunctionQuery and ValueSource are invaluable and will become available to all Lucene users in LUCENE-2883. But in order to do so, we need to remove the coupling of this functionality to Solr, and make it more standard. Any and all thoughts about how to do this are appreciated. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-2533) Improve API of ValueSource FunctionQuery SortField weighting
[ https://issues.apache.org/jira/browse/SOLR-2533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13036978#comment-13036978 ] Michael McCandless commented on SOLR-2533: -- Can we add weighting to Lucene's SortField? Improve API of ValueSource FunctionQuery SortField weighting -- Key: SOLR-2533 URL: https://issues.apache.org/jira/browse/SOLR-2533 Project: Solr Issue Type: Improvement Components: search Reporter: Chris Male Started from LUCENE-2883: Support for sorting by ValueSource and FunctionQueries is done through ValueSource#getSort and the ValueSourceSortField. In order to support VSs containing other Queries, its necessary to allow the Querys to be weighted by an IndexSearcher. Currently this is handled by having ValueSourceSortField implement SolrSortField. In Solr's SolrIndexSearcher, SortFields implementing SolrSortField are then weighted before the Sort is used. Sorting by FunctionQuery and ValueSource are invaluable and will become available to all Lucene users in LUCENE-2883. But in order to do so, we need to remove the coupling of this functionality to Solr, and make it more standard. Any and all thoughts about how to do this are appreciated. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org