I wanted to get cosine similarity between a long query and a document in a collection. I'm using Lucence to index the collection and submitting the queries to retrieve documents.
However, I'm getting the following error for some of the queries.
"Caused by: org.apache.lucene.search.BooleanQuery$TooManyClauses: maxClauseCount is set to 1024"
I replicated some of the terms in the query to boost their weight. But it seems lucene is just doing simple boolean retrieval instead of calculating the cosine similarity using tf-idf for both document and query.
Can anybody confirm this ?