Class SpanQuery

    • Constructor Detail

      • SpanQuery

        public SpanQuery()
    • Method Detail

      • getSpans

        public abstract Spans getSpans​(AtomicReaderContext context,
                                       Bits acceptDocs,
                                       java.util.Map<Term,​TermContext> termContexts)
                                throws java.io.IOException
        Expert: Returns the matches for this query in an index. Used internally to search for spans.
        Throws:
        java.io.IOException
      • getField

        public abstract java.lang.String getField()
        Returns the name of the field matched by this query.

        Note that this may return null if the query matches no terms.

      • createWeight

        public Weight createWeight​(IndexSearcher searcher)
                            throws java.io.IOException
        Description copied from class: Query
        Expert: Constructs an appropriate Weight implementation for this query.

        Only implemented by primitive queries, which re-write to themselves.

        Overrides:
        createWeight in class Query
        Throws:
        java.io.IOException