NIH | National Cancer Institute | NCI Wiki  

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • AbstractLazyCodeHolderFactory 
    • org.apache.lucene.search.BooleanQuery;
    •  org.apache.lucene.search.Filter;
    •  org.apache.lucene.search.FilteredQuery;
    •  org.apache.lucene.search.Query;
    •  org.apache.lucene.search.ScoreDoc;
    •  org.apache.lucene.search.BooleanClause.Occur;
    •  org.compass.core.lucene.support.ChainedFilter;
  • CodedNodeSetImpl
    • org.apache.lucene.search.BooleanQuery;
    •   org.apache.lucene.search.MatchAllDocsQuery;
    •  org.apache.lucene.search.Query;
    •  org.apache.lucene.search.BooleanClause.Occur;

 

There are specific cases of logic that will need to evaluated when doing the actual implementation.  These cases include code where Lucene objects are intermixed throughout LexEVS methods.  An example of this would be here:
  • AbstractLazyCodeHolderFactory. buildCodeHolderWithFilters()
  • CodedNodeSetImpl.runPendingOps()


Different Lucene Query methods that could be pulled out of CodedNodeSetImpl and AbstractLazyCodeHolderFactory.  These methods can be pushed into an implementation of the Query interface below.  The interface will be used instead of calling Lucene directly.

Code Block
languagejava
titleQuery Interface
//code decoupling

// Interface for creating Queries
public interface Query {

	// methods required for CodedNodeSetImpl 
	public  Query getCodingSchemeQuery(String uri, String internalVersionString);  
	public  Query getRestrictionQuery(Restriction restriction, String internalCodeSystemName, String internalVersionString);  

	// methods required for AbstractLazyCodeHolderFactory
	private  Query getBooleanQuery(List<Query> queries);
	public Query getFilteredQuery(List<Filter> filters, BooleanQuery combinedQuery, Filter chainedFilter);
}

// Lucene Implementation
public class LuceneQuery implements Query {

}

 

Interface for a ScoreDoc Factory.  AbstractLazyCodeHolderFactory.buildCodeHolder is currently using ScoreDocs.

Code Block
titleScoreDocFactory
public interface ScoreDocFactory {

     List<ScoreDoc> getScoreDocs (EntityIndexService service, AbsoluteCodingSchemeVersionReference ref, List<BooleanQuery> combinedQuery,List<Query> bitSetQueries);
}

...