@Test
public void baseSimilarityTest() {
try {
IndexSearcher searcher = new IndexSearcher(dir, true);
Similarity payloadSimilarity = new UIMATypeBasedSimilarity();
searcher.setSimilarity(payloadSimilarity);
// BooleanQuery booleanQuery = new BooleanQuery();
// booleanQuery.add(new PayloadTermQuery(new Term("title", "London"), new MaxPayloadFunction()), BooleanClause.Occur.SHOULD);
// booleanQuery.add(new PayloadTermQuery(new Term("title", "English"), new MaxPayloadFunction()), BooleanClause.Occur.SHOULD);
// SpanQuery[] clauses = new SpanQuery[]{new PayloadTermQuery(new Term("title","London"),new MaxPayloadFunction()),