Skip to content

overview-summary.html: no suitable method for isearcher.search(query, null, 1000) [LUCENE-7820] #8871

@asfimport

Description

@asfimport

The example in overview-summary.html includes the lines

    IndexSearcher isearcher = new IndexSearcher(ireader);
...
    ScoreDoc[] hits = isearcher.search(query, null, 1000).scoreDocs;

However javac complains there is no suitable method for search(Query,<null>,int).
The example runs with the null removed.

-    ScoreDoc[] hits = isearcher.search(query, null, 1000).scoreDocs;
+    ScoreDoc[] hits = isearcher.search(query, 1000).scoreDocs;

Pages:

http://lucene.apache.org/core/6_5_1/core/overview-summary.html#overview.description
http://lucene.apache.org/core/6_5_1/core/org/apache/lucene/search/IndexSearcher.html

This overview is prominently linked as "Introduction to Lucene APIs" on the documentation page
http://lucene.apache.org/core/6_5_1/index.html


Migrated from LUCENE-7820 by Nimarukan, updated Apr 29 2018
Pull requests: apache/lucene-solr#366

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions