overview-summary.html: no suitable method for isearcher.search(query, null, 1000) [LUCENE-7820]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
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,,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](https://issues.apache.org/jira/browse/LUCENE-7820) by Nimarukan, updated Apr 29 2018
Pull requests: https://github.com/apache/lucene-solr/pull/366
Contributor guide
Research direction
Open overview-summary.html and inspect the Introduction to Lucene APIs example around IndexSearcher.search. Compile the example with the Lucene 6.5.1 API to confirm the reported overload error, then verify that the corrected call compiles and the overview no longer shows the invalid invocation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100