public void setDocSet(DocSet set) { if( docListAndSet == null ) { docListAndSet = new DocListAndSet(); } docListAndSet.docSet = set; }
public void setDocList(DocList list) { if( docListAndSet == null ) { docListAndSet = new DocListAndSet(); } docListAndSet.docList = list; }
public DocListAndSet getMoreLikeThis( Reader reader, int start, int rows, List<Query> filters, List<InterestingTerm> terms, int flags ) throws IOException { mltquery = mlt.like(reader); setBoosts(mltquery); if( terms != null ) { fillInterestingTermsFromMLTQuery( mltquery, terms ); } DocListAndSet results = new DocListAndSet(); if (this.needDocSet) { results = searcher.getDocListAndSet(mltquery, filters, null, start, rows, flags); } else { results.docList = searcher.getDocList(mltquery, filters, null, start, rows, flags); } return results; }
public MLTResult getMoreLikeThisFromContentSteam(Reader reader, int start, int rows, List<Query> filters, int flags, Sort lsort) throws IOException, SyntaxError { MLTQuery mltQuery = mlt.like(reader); Query rawMLTQuery = mltQuery.getOrQuery(); if(mltQuery.getMustMatchQuery() != null || mltQuery.getMustNOTMatchQuery() != null){ throw new RuntimeException( String.format("The %s and the %s parameters are not supported for content stream queries", MoreLikeThisParams.FL_MUST_MATCH, MoreLikeThisParams.FL_MUST_NOT_MATCH)); } Query boostedMLTQuery = getBoostedFunctionQuery( rawMLTQuery ); DocListAndSet results = new DocListAndSet(); if (this.needDocSet) { results = searcher.getDocListAndSet( boostedMLTQuery, filters, lsort, start, rows, flags); } else { results.docList = searcher.getDocList( boostedMLTQuery, filters, lsort, start, rows, flags); } return new MLTResult(mltQuery.getMltTerms(), boostedMLTQuery, results); }
public DocListAndSet getMoreLikeThis( int id, int start, int rows, List<Query> filters, List<InterestingTerm> terms, int flags ) throws IOException { Document doc = reader.document(id); mltquery = mlt.like(id); setBoosts(mltquery); if( terms != null ) { fillInterestingTermsFromMLTQuery( mltquery, terms ); } // exclude current document from results BooleanQuery mltQuery = new BooleanQuery(); mltQuery.add(mltquery, BooleanClause.Occur.MUST); mltQuery.add( new TermQuery(new Term(uniqueKeyField.getName(), uniqueKeyField.getType().storedToIndexed(doc.getFieldable(uniqueKeyField.getName())))), BooleanClause.Occur.MUST_NOT); DocListAndSet results = new DocListAndSet(); if (this.needDocSet) { results = searcher.getDocListAndSet(mltQuery, filters, null, start, rows, flags); } else { results.docList = searcher.getDocList(mltQuery, filters, null, start, rows, flags); } return results; }
DocListAndSet results = new DocListAndSet(); if (this.needDocSet) { results = searcher.getDocListAndSet(finalUfQuery, filters, lsort, start, rows, flags);
Query finalMLTQuery = qryBuilder.build(); DocListAndSet results = new DocListAndSet(); if (this.needDocSet) { results = searcher.getDocListAndSet(finalMLTQuery, filters, lsort, start, rows, flags);
DocListAndSet res = new DocListAndSet(); res.docList = new DocSlice(0, docs, luceneIds, null, docs, maxScore); if (rb.isNeedDocSet()) {
mltDocs = new DocListAndSet(); // avoid NPE
DocListAndSet res = new DocListAndSet(); res.docList = new DocSlice(0, docs, luceneIds, null, docs, 0); if (rb.isNeedDocSet()) {
try { rb.doHighlights = true; DocListAndSet res = new DocListAndSet(); SchemaField idField = OpenCms.getSearchManager().getSolrServerConfiguration().getSolrSchema().getUniqueKeyField();
mltDocs = new DocListAndSet(); // avoid NPE
final DocListAndSet results = new DocListAndSet();
DocListAndSet results = new DocListAndSet(); if( usfdbkResult != null ) { results = usfdbkResult.getResults();
DocListAndSet out = new DocListAndSet(); qr.setDocListAndSet(out); QueryResultKey key=null;