[ 
https://issues.apache.org/jira/browse/LUCENE-4043?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David vandendriessche updated LUCENE-4043:
------------------------------------------

    Comment: was deleted

(was: Update on my code:

public class TestParserPlugin extends QParserPlugin {

    @Override
    public QParser createParser(String string, SolrParams sp, SolrParams sp1, 
SolrQueryRequest sqr) {
        return new TestParser(string, sp1, sp1, sqr);

    }

    @Override
    public void init(NamedList nl) {
    }

    public class TestParser extends QParser {

        public TestParser(String qstr, SolrParams localParams, SolrParams 
params, SolrQueryRequest req) {
            super(qstr, localParams, params, req);
        }

        @Override
        public org.apache.lucene.search.Query parse() throws 
org.apache.lucene.queryparser.classic.ParseException {

            IndexReader reader;
            try {
                //reader = IndexReader.open(FSDirectory.open(new 
File("C:\\java\\apache-solr-4.0.0\\apache-solr-4.0.0\\example\\solr\\Books\\data\\index")));

                //IndexSearcher searcher = new IndexSearcher(reader);
                IndexSearcher searcher=req.getSearcher(); //other way of 
getting searcher
                BooleanQuery fromQuery = new BooleanQuery();
                fromQuery.add(new TermQuery(new Term("pageTxt", "crazy")), 
BooleanClause.Occur.MUST);
                fromQuery.add(new TermQuery(new Term("pageTxt", "test")), 
BooleanClause.Occur.SHOULD);
                return JoinUtil.createJoinQuery("pageId", true, 
"fileId",fromQuery, searcher, ScoreMode.Avg);
            } catch (IOException ex) {
                
Logger.getLogger(TestParserPlugin.class.getName()).log(Level.SEVERE, null, ex);
            }
            return null;
        }
    }
}

I still have 2 questions concerning this code:
IS my method to get the searcher alright?
Is it possible to combine this qparser with edismax etc in stead of building 
queries using occur.must etc...)
    
> Add scoring support for query time join
> ---------------------------------------
>
>                 Key: LUCENE-4043
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4043
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: modules/join
>            Reporter: Martijn van Groningen
>             Fix For: 4.0-ALPHA
>
>         Attachments: LUCENE-4043.patch, LUCENE-4043.patch, LUCENE-4043.patch, 
> LUCENE-4043.patch
>
>
> Have similar scoring for query time joining just like the index time block 
> join (with the score mode).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to