Commit Graph

803 Commits

Author SHA1 Message Date
Bernhard Messer 16552ede59 avoid ArrayIndexOutOfBoundsException in method refill() when bufferLength gets a negativ value. It happens when TermVectorsReader.get(int docID) is used with a docID larger than number of documents stored in the index.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150680 13f79535-47bb-0310-9956-ffa450edef68
2004-11-28 13:33:55 +00:00
Daniel Naber 918572be86 improve javadoc by mentioning Filter
PR: 32365
Submitted by: Paul Elschot


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150673 13f79535-47bb-0310-9956-ffa450edef68
2004-11-24 22:06:12 +00:00
Daniel Naber 1bc761f26a don't append "*" to the term, it doesn't make sense and is confusing
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150672 13f79535-47bb-0310-9956-ffa450edef68
2004-11-24 19:41:16 +00:00
Daniel Naber 31335c60ae small javadoc fix
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150671 13f79535-47bb-0310-9956-ffa450edef68
2004-11-24 19:34:11 +00:00
Christoph Goller 74f6ac4615 Old class name replaced with new class name in Javadoc
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150670 13f79535-47bb-0310-9956-ffa450edef68
2004-11-24 17:40:48 +00:00
Daniel Naber d040882872 adapt to new typesafe API
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150669 13f79535-47bb-0310-9956-ffa450edef68
2004-11-23 23:14:31 +00:00
Daniel Naber 197ad763d1 get/setOperator becomes get/setDefaultOperator and its parameter is now typsafe
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150668 13f79535-47bb-0310-9956-ffa450edef68
2004-11-23 23:13:34 +00:00
Daniel Naber 742417162a throw NullPointerException instead of IllegalArgumentException; small typo fixes
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150667 13f79535-47bb-0310-9956-ffa450edef68
2004-11-23 22:36:10 +00:00
Erik Hatcher d0623a8e13 Add first pass for NumberUtils, adapted from code contributed by Matt Quail.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150666 13f79535-47bb-0310-9956-ffa450edef68
2004-11-23 21:07:49 +00:00
Daniel Naber 6bf1504200 some small javadoc improvements
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150665 13f79535-47bb-0310-9956-ffa450edef68
2004-11-23 20:56:06 +00:00
Daniel Naber 552c9465c8 remove javadoc for rewrite(), will be copied from superclass automatically
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150664 13f79535-47bb-0310-9956-ffa450edef68
2004-11-23 20:54:47 +00:00
Daniel Naber c35d916355 adding license; typo fix
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150663 13f79535-47bb-0310-9956-ffa450edef68
2004-11-23 19:56:40 +00:00
Daniel Naber c4fb0d010f fixing typos in comments
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150662 13f79535-47bb-0310-9956-ffa450edef68
2004-11-23 19:54:32 +00:00
Daniel Naber 308811b558 adding license; use the non-deprecated Field constructors
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150661 13f79535-47bb-0310-9956-ffa450edef68
2004-11-23 19:48:55 +00:00
Christoph Goller b674ad711f Javadoc correction as suggested by Bug#32353
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150660 13f79535-47bb-0310-9956-ffa450edef68
2004-11-23 19:22:24 +00:00
Christoph Goller 6e71206441 small Javadoc correction
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150659 13f79535-47bb-0310-9956-ffa450edef68
2004-11-23 19:05:15 +00:00
Erik Hatcher b01416fcb3 Added RangeFilter and tests contributed by Chris M Hostetter.
Deprecated DateFilter and DateField.


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150658 13f79535-47bb-0310-9956-ffa450edef68
2004-11-23 14:17:18 +00:00
Bernhard Messer debe012863 add short description for the new test and remove misleading comment.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150657 13f79535-47bb-0310-9956-ffa450edef68
2004-11-22 09:37:24 +00:00
Bernhard Messer f2b8cfbde7 add a test for bug 31976
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150656 13f79535-47bb-0310-9956-ffa450edef68
2004-11-21 22:33:54 +00:00
Bernhard Messer b77b25d52b Fix for bug: 31976, avoid NullPointerException when adding a document with an single, empty field and term vectors enabled.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150655 13f79535-47bb-0310-9956-ffa450edef68
2004-11-21 22:32:49 +00:00
Daniel Naber f9f3f74b68 open the searcher so that the searcher's close() call will close the implicitly opened reader
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150653 13f79535-47bb-0310-9956-ffa450edef68
2004-11-19 20:58:45 +00:00
Daniel Naber 229e6e039f adding a comment that opening an IndexReader can be slow
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150650 13f79535-47bb-0310-9956-ffa450edef68
2004-11-18 19:28:02 +00:00
Daniel Naber eb5344256f close the searcher at the end of the page
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150649 13f79535-47bb-0310-9956-ffa450edef68
2004-11-18 19:22:27 +00:00
Daniel Naber 724f27f4bc use Exception.toString() instead of getMessage() for a slighlty more verbose message
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150648 13f79535-47bb-0310-9956-ffa450edef68
2004-11-18 19:15:28 +00:00
Bernhard Messer d9f00f1d09 show a useful error message if the directory to index doesn't exist or isn't readable.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150647 13f79535-47bb-0310-9956-ffa450edef68
2004-11-18 18:54:13 +00:00
Bernhard Messer 34c106218e make the error messages more verbose using the exceptions toString() method.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150646 13f79535-47bb-0310-9956-ffa450edef68
2004-11-18 18:37:53 +00:00
Bernhard Messer fc6694ef9d change from cal.setTimeInMillis(long l) to cal.setTime(Date d) because cal.setTimeInMillis(...) was protected in JDK's prior to 1.4
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150645 13f79535-47bb-0310-9956-ffa450edef68
2004-11-16 22:27:54 +00:00
Bernhard Messer 1515574bff change from RuntimeException (Exception e) to RuntimeException (String s) to be backward compatible with jdk 1.3
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150644 13f79535-47bb-0310-9956-ffa450edef68
2004-11-16 21:57:47 +00:00
Daniel Naber ffc746e3d0 throw IllegalArgumentException for nDocs <= 0 to avoid NullPointerException
PR: 32227
Submitted by: Paul Elschot


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150641 13f79535-47bb-0310-9956-ffa450edef68
2004-11-14 13:26:28 +00:00
Daniel Naber bcfcf9eeb7 test QueryParser's ability to be used with Analyzers that return more than one token per position
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150640 13f79535-47bb-0310-9956-ffa450edef68
2004-11-13 15:16:11 +00:00
Daniel Naber f8d0d0b140 make QueryParser work with analyzers that return more than one token per position
PR: 23307
Submitted by: Pierrick Brihaye


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150639 13f79535-47bb-0310-9956-ffa450edef68
2004-11-13 15:11:26 +00:00
Daniel Naber a637ff56b3 test slop
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150638 13f79535-47bb-0310-9956-ffa450edef68
2004-11-10 15:18:27 +00:00
Daniel Naber ac7576a81c small refactoring
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150637 13f79535-47bb-0310-9956-ffa450edef68
2004-11-10 13:59:23 +00:00
Daniel Naber 747a6cce17 fixing typo in variable name and incorrect comment
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150636 13f79535-47bb-0310-9956-ffa450edef68
2004-11-10 13:55:23 +00:00
Daniel Naber 49ab2ff423 test that IllegalArgumentException is thrown if terms belong to different fields
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150635 13f79535-47bb-0310-9956-ffa450edef68
2004-11-10 11:39:25 +00:00
Erik Hatcher b708ac392e move from FQCN to import
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150632 13f79535-47bb-0310-9956-ffa450edef68
2004-11-09 15:12:16 +00:00
Daniel Naber 8d45546b72 fix javadoc
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150631 13f79535-47bb-0310-9956-ffa450edef68
2004-11-08 00:10:39 +00:00
Daniel Naber 2c1dc30639 indent the same everywhere, no functional change
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150630 13f79535-47bb-0310-9956-ffa450edef68
2004-11-07 23:41:50 +00:00
Daniel Naber 898aa6abe6 speed up Fuzzy queries 20%-50%, I only did some small whitespace and comment fixes compared to the original patch
PR: 31882
Submitted by: Jonathan Hager


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150628 13f79535-47bb-0310-9956-ffa450edef68
2004-11-07 23:27:24 +00:00
Daniel Naber 3c4f929368 typo fixes in javadoc
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150622 13f79535-47bb-0310-9956-ffa450edef68
2004-10-27 21:59:02 +00:00
Otis Gospodnetic cfc3a8109b - Fixed compareTo(Object) javadoc
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150621 13f79535-47bb-0310-9956-ffa450edef68
2004-10-23 00:50:31 +00:00
Daniel Naber 5869962cf0 improve javadoc
PR:30685
Submitted by: Paul Elschot


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150619 13f79535-47bb-0310-9956-ffa450edef68
2004-10-19 19:51:35 +00:00
Daniel Naber 8a37ed97d9 don't use the deprecated API in the documentation example
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150618 13f79535-47bb-0310-9956-ffa450edef68
2004-10-18 22:36:54 +00:00
Daniel Naber 1aa4ae4a31 fix comments, no functional change
PR: 31748
Submitted by: Paul Elschot


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150616 13f79535-47bb-0310-9956-ffa450edef68
2004-10-17 11:47:05 +00:00
Daniel Naber 8aaf570ed6 improve doc for default constructor, no functional change
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150615 13f79535-47bb-0310-9956-ffa450edef68
2004-10-17 11:19:39 +00:00
Daniel Naber 3a84008a63 security: the error message was not escaped, this could enable cross site scripting
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150614 13f79535-47bb-0310-9956-ffa450edef68
2004-10-16 16:21:58 +00:00
Daniel Naber a819643d58 avoid accessing deprecated field
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150613 13f79535-47bb-0310-9956-ffa450edef68
2004-10-16 13:03:34 +00:00
Daniel Naber 7618ca9403 don't link the deprecated PhrasePrefixQuery in the documentation
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150612 13f79535-47bb-0310-9956-ffa450edef68
2004-10-15 19:50:58 +00:00
Daniel Naber 9daff285c9 several small documentation fixes -- no functional change except a "Usage" message in the main() method
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150611 13f79535-47bb-0310-9956-ffa450edef68
2004-10-15 19:47:43 +00:00
Christoph Goller a5d04f404c Improved Javadoc: Formula for score computation
corrected.


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150607 13f79535-47bb-0310-9956-ffa450edef68
2004-10-13 18:42:20 +00:00
Daniel Naber 5befa0d3ac make the test case timezone independent
Submitted by: Anatol Pomozov


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150606 13f79535-47bb-0310-9956-ffa450edef68
2004-10-13 18:08:51 +00:00
Doug Cutting 1a78116cc7 Add a command-line option which permits the norms from a single field
to be used for all fields.  Norms are read into memory, using a byte
of memory per document per searched field.  This can cause search of
large collections with a large number of fields to run out of memory.
If all of the fields contain only a single token, then the norms are
all identical, and a single norm vector may be shared.


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150605 13f79535-47bb-0310-9956-ffa450edef68
2004-10-13 17:33:14 +00:00
Doug Cutting b2416b3039 Check the type of the IndexInput rather than the Directory to detect
native implementation.  This is a simpler and more correct test.  It
also permits the Directory to return a mixture of native and
non-native IndexInput implementations.


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150604 13f79535-47bb-0310-9956-ffa450edef68
2004-10-13 17:23:26 +00:00
Doug Cutting feaea07b3c Only mmap .frq files, to conserve address space.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150603 13f79535-47bb-0310-9956-ffa450edef68
2004-10-13 17:19:58 +00:00
Doug Cutting 55e076372a Correctly translate errors from mmap() into exceptions.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150602 13f79535-47bb-0310-9956-ffa450edef68
2004-10-13 17:19:06 +00:00
Doug Cutting c429a5f1e6 Reverse a mistaken optimization. With a larger collection and set of
queries I find that a table size of 2k works best.


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150601 13f79535-47bb-0310-9956-ffa450edef68
2004-10-13 17:12:04 +00:00
Daniel Naber 46ceb15879 fix HTML (& must be escaped as &amp; in URLs); escape query in the "more results" link; fix typos in comments
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150600 13f79535-47bb-0310-9956-ffa450edef68
2004-10-12 22:14:26 +00:00
Daniel Naber ce7aaab8af fix typo in target name
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150599 13f79535-47bb-0310-9956-ffa450edef68
2004-10-12 17:53:40 +00:00
Christoph Goller 25d89037c6 default prefix length set to 0 instead of 2 until our test
suggest a better value


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150598 13f79535-47bb-0310-9956-ffa450edef68
2004-10-12 09:42:02 +00:00
Christoph Goller 5d4c27b23d Reinsert old API for getFieldQuery, getRangeQuery, and
getFuzzyQuery and deprecate it.


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150597 13f79535-47bb-0310-9956-ffa450edef68
2004-10-12 09:36:12 +00:00
Daniel Naber e5cd911a29 deprecate the public fields, add get/set methods instead
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150595 13f79535-47bb-0310-9956-ffa450edef68
2004-10-11 21:24:39 +00:00
Daniel Naber 257adde8c7 trying to make the testcase timezone independent
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150594 13f79535-47bb-0310-9956-ffa450edef68
2004-10-11 20:32:44 +00:00
Doug Cutting b6d184b28f Restore an import required by GCJ's compiler.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150593 13f79535-47bb-0310-9956-ffa450edef68
2004-10-11 17:07:39 +00:00
Daniel Naber 2950ecc4f7 remove useless placeholder comments
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150591 13f79535-47bb-0310-9956-ffa450edef68
2004-10-10 18:58:48 +00:00
Daniel Naber cc7490d251 some javadoc comment improvements
PR: 31350
Submitted by: Paul Elschot


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150590 13f79535-47bb-0310-9956-ffa450edef68
2004-10-10 18:43:18 +00:00
Daniel Naber 38fb6ab76d fix for a typo in a javadoc comment
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150589 13f79535-47bb-0310-9956-ffa450edef68
2004-10-10 18:37:47 +00:00
Daniel Naber 31fdebb91c remove code that was commented out, fix whitespace, no functional change
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150588 13f79535-47bb-0310-9956-ffa450edef68
2004-10-10 16:07:19 +00:00
Daniel Naber 1bb4a0a252 use the non-deprecated API, no functional change
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150587 13f79535-47bb-0310-9956-ffa450edef68
2004-10-10 16:05:36 +00:00
Daniel Naber d644998f55 use the non-deprecated API, no functional change
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150586 13f79535-47bb-0310-9956-ffa450edef68
2004-10-10 15:58:32 +00:00
Daniel Naber 8bf11bc856 cleanup: don't declare exceptions that can never be thrown
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150585 13f79535-47bb-0310-9956-ffa450edef68
2004-10-10 15:44:45 +00:00
Daniel Naber a25fdef56d call static methods via class, not via object (better style, no functional change)
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150584 13f79535-47bb-0310-9956-ffa450edef68
2004-10-10 15:44:09 +00:00
Daniel Naber ef02d9af38 copied from TestPhrasePrefixQuery, added a test for toString() and added a test where the first term is expanded
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150583 13f79535-47bb-0310-9956-ffa450edef68
2004-10-10 15:33:56 +00:00
Daniel Naber 59f20d1ada Deprecate PhrasePrefixQuery and copy it to MultiPhraseQuery; also fix toString() in MultiPhraseQuery
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150582 13f79535-47bb-0310-9956-ffa450edef68
2004-10-10 15:27:15 +00:00
Doug Cutting e56faa3097 Optimize term dictionary lookup to allocate fewer terms.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150581 13f79535-47bb-0310-9956-ffa450edef68
2004-10-08 15:58:49 +00:00
Daniel Naber 1f11f2e937 print usage information if user requests it with -h or -help
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150580 13f79535-47bb-0310-9956-ffa450edef68
2004-10-07 18:19:16 +00:00
Daniel Naber 135f24a875 don't declare an Exception that can never be thrown
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150579 13f79535-47bb-0310-9956-ffa450edef68
2004-10-07 18:10:52 +00:00
Daniel Naber 5738ff629e small typo fixes
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150578 13f79535-47bb-0310-9956-ffa450edef68
2004-10-06 21:15:02 +00:00
Daniel Naber 32879aea8d import cleanup
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150577 13f79535-47bb-0310-9956-ffa450edef68
2004-10-06 21:02:26 +00:00
Daniel Naber c37a40f444 don't declare an Exception that can never be thrown
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150576 13f79535-47bb-0310-9956-ffa450edef68
2004-10-06 21:01:55 +00:00
Daniel Naber aca15c3e1d call static methods via class, not via object (better style, no functional change)
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150575 13f79535-47bb-0310-9956-ffa450edef68
2004-10-06 21:01:12 +00:00
Daniel Naber 251d0f5a54 make toString() output slightly more logical (compressed only refers to stored fields)
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150574 13f79535-47bb-0310-9956-ffa450edef68
2004-10-06 20:03:25 +00:00
Daniel Naber 01e3ab0d13 small fixes for javadoc
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150573 13f79535-47bb-0310-9956-ffa450edef68
2004-10-06 19:55:42 +00:00
Christoph Goller a433e2c1de FuzzyQuery is now using a default prefix length of 2 in
order to become usable for big indices. Furthermore, it
no longer throws TooManyClausesException.


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150572 13f79535-47bb-0310-9956-ffa450edef68
2004-10-06 16:19:52 +00:00
Christoph Goller bcafc0d719 readResolve has to be accessible from all subclasses.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150570 13f79535-47bb-0310-9956-ffa450edef68
2004-10-06 11:26:43 +00:00
Christoph Goller 4953fa5c71 Remove synchronization from TermVectors
(Patch #30736)


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150569 13f79535-47bb-0310-9956-ffa450edef68
2004-10-06 10:40:23 +00:00
Christoph Goller 3e955f8c77 Introduce a serializable Parameter Class.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150568 13f79535-47bb-0310-9956-ffa450edef68
2004-10-06 09:19:04 +00:00
Christoph Goller bbf79a5ad0 Remove some deprecated warnings from core.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150567 13f79535-47bb-0310-9956-ffa450edef68
2004-10-06 09:05:56 +00:00
Christoph Goller f1667be0fc Grant's nw termvector patch (Bug #18927) applied with
some modifications.


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150566 13f79535-47bb-0310-9956-ffa450edef68
2004-10-05 17:30:48 +00:00
Doug Cutting c6d6a390df Fix so that tests run with alternate Directory implementations.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150565 13f79535-47bb-0310-9956-ffa450edef68
2004-10-04 19:46:23 +00:00
Doug Cutting d82e2362f4 Improved version by Paul Elschot that can handle files longer than 2^31.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150563 13f79535-47bb-0310-9956-ffa450edef68
2004-10-04 19:44:11 +00:00
Doug Cutting 07c48aa589 Disable optimized implementation with compound format.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150562 13f79535-47bb-0310-9956-ffa450edef68
2004-10-04 19:05:05 +00:00
Daniel Naber 360d91dde7 Adding a small comment that says people should use only one IndexSearches for all searches.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150554 13f79535-47bb-0310-9956-ffa450edef68
2004-09-30 20:53:07 +00:00
Christoph Goller d187ef261c Use byte instead of short as bit-mask.
No functional change.


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150548 13f79535-47bb-0310-9956-ffa450edef68
2004-09-30 13:36:57 +00:00
Christoph Goller 3edae1d01c Allow stored fields to be compressed (see Bug#31149)
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150546 13f79535-47bb-0310-9956-ffa450edef68
2004-09-30 12:40:28 +00:00
Doug Cutting 260dcbe4ef Note the GCJ bug that this is a workaround for.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150542 13f79535-47bb-0310-9956-ffa450edef68
2004-09-29 16:29:48 +00:00
Christoph Goller 370639d43e Patch for Bug# 31240. This patch hopefully removes a
memory leak in the sort code.


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150541 13f79535-47bb-0310-9956-ffa450edef68
2004-09-29 15:09:02 +00:00
Christoph Goller 8b1fd56ae0 Wrong cast corrected.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150540 13f79535-47bb-0310-9956-ffa450edef68
2004-09-29 15:06:56 +00:00
Doug Cutting 197e907924 Fixed so that file is no longer kept open.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150539 13f79535-47bb-0310-9956-ffa450edef68
2004-09-28 21:55:59 +00:00
Doug Cutting 8a241604da Add an nio mmap based Directory implementation.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150538 13f79535-47bb-0310-9956-ffa450edef68
2004-09-28 21:40:11 +00:00
Doug Cutting b32c045d35 Updated FSDirectory and RAMDirectory to no longer use deprecated methods.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150537 13f79535-47bb-0310-9956-ffa450edef68
2004-09-28 20:45:26 +00:00
Doug Cutting 79892c1f40 Replace OutputStream with IndexOutput and BufferedIndexOutput to permit unbuffered Directory implementations.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150536 13f79535-47bb-0310-9956-ffa450edef68
2004-09-28 18:15:52 +00:00
Doug Cutting 1b8843fa04 Oops. Fixed a bug I introduced in my last change. Thanks to
Cristoph for catching this!  I overgeneralized.  Sorted results are
not always the highest scoring.


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150535 13f79535-47bb-0310-9956-ffa450edef68
2004-09-28 16:54:44 +00:00
Doug Cutting 5a3cfc5372 Compile most of Lucene's core code with a single call to gcj. This
permits more cross-class inlining.  In particular, the final method
PriorityQueue.size() can inline, which speeds things 7.5% in my
benchmarks.  Note that 'final' declarations *do* sometimes make things
faster in GCJ.  So let's not remove them all!


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150534 13f79535-47bb-0310-9956-ffa450edef68
2004-09-23 16:59:10 +00:00
Doug Cutting a71929fe4e Remvoe dead code that GCJ doesn't like.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150533 13f79535-47bb-0310-9956-ffa450edef68
2004-09-23 16:43:47 +00:00
Doug Cutting a69db22983 Add an import so that GCJ can compile this.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150532 13f79535-47bb-0310-9956-ffa450edef68
2004-09-23 16:42:44 +00:00
Doug Cutting 69d4dc5d06 Add GCJ native code for SegmentTermDocs.read(int[],int[]) to accellerate TermScorer. TermScorer and BooleanScorer are now usually a bit faster under GCJ than under Sun's JVM.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150531 13f79535-47bb-0310-9956-ffa450edef68
2004-09-22 18:32:27 +00:00
Doug Cutting 8ca05a3deb Inline decodeNorm() in TermQuery to make searches faster in Java implementations, like GCJ, where simple methods are not inlined.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150530 13f79535-47bb-0310-9956-ffa450edef68
2004-09-22 18:18:27 +00:00
Doug Cutting e1e3d71cc8 Optimize TermQuery within BooleanQuery, a common case.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150529 13f79535-47bb-0310-9956-ffa450edef68
2004-09-22 17:56:00 +00:00
Doug Cutting b85006589c Do not construct a ScoreDoc for every non-zero hit, but only for those
in the current top scoring set.  This makes a substantial performance
improvement for queries that match lots of documents.


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150528 13f79535-47bb-0310-9956-ffa450edef68
2004-09-22 17:03:00 +00:00
Daniel Naber 0a5fab187b Add this file again, but deprecate it. It had been removed already, but re-adding it has the advantage that people will get deprecation warnings instead of compile errors if they use this class. Just like for all the other API changes we have done.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150527 13f79535-47bb-0310-9956-ffa450edef68
2004-09-20 19:27:01 +00:00
Doug Cutting ae6229c8cb Add native GCJ Directory implementation.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150525 13f79535-47bb-0310-9956-ffa450edef68
2004-09-20 18:14:25 +00:00
Daniel Naber 65ce0a021b order was undefined in case of duplicate sort keys, this could lead to incorrect results (documents appearing twice in the result set, other documents missing) if there were more than 100 matches.
PR:31241


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150523 13f79535-47bb-0310-9956-ffa450edef68
2004-09-18 18:21:17 +00:00
Daniel Naber ba6bb29e3b use the same amount of whitespace everywhere, no functional change
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150522 13f79535-47bb-0310-9956-ffa450edef68
2004-09-17 19:24:14 +00:00
Daniel Naber e6b01e4617 fix toString output; make the comments real javadoc comments
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150521 13f79535-47bb-0310-9956-ffa450edef68
2004-09-17 19:21:14 +00:00
Daniel Naber 6333405ab9 remove unused import statement
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150520 13f79535-47bb-0310-9956-ffa450edef68
2004-09-17 19:16:01 +00:00
Daniel Naber 4c5f926cbd fix link in doc
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150519 13f79535-47bb-0310-9956-ffa450edef68
2004-09-17 19:15:28 +00:00
Doug Cutting 99fdf6af1f Permit unbuffered index input.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150517 13f79535-47bb-0310-9956-ffa450edef68
2004-09-16 21:13:37 +00:00
Doug Cutting faebce61db Add options so that this is also useful for search benchmarking.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150516 13f79535-47bb-0310-9956-ffa450edef68
2004-09-16 20:57:05 +00:00
Daniel Naber e0c8c5a469 avoid warnings with "ant javadocs"
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150515 13f79535-47bb-0310-9956-ffa450edef68
2004-09-15 21:09:00 +00:00
Daniel Naber 6c8289a87c test if fuzzy query throws ParseException, test getter methods
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150514 13f79535-47bb-0310-9956-ffa450edef68
2004-09-15 19:45:02 +00:00
Daniel Naber 45ac0c2628 add public methods to query the minimum similarity and the prefix length
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150513 13f79535-47bb-0310-9956-ffa450edef68
2004-09-15 19:44:01 +00:00
Christoph Goller 99d5aeee4a Throw ParseException instead of IllegalArgumentException
in case of illegal value for FuzzyQuery minimum similarity
parameter.


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150511 13f79535-47bb-0310-9956-ffa450edef68
2004-09-15 13:37:26 +00:00
Christoph Goller a6fad246dd Applied patch #29370 supplied by Drew Farris and
Bernhard Messer.


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150510 13f79535-47bb-0310-9956-ffa450edef68
2004-09-15 12:50:23 +00:00
Christoph Goller fd4cd859c5 PhraseQuery and PhrasePrefixQuery are extended. It's now
possible to specify the relative position of a term within
a phrase. This allows gaps and multiple terms at the same
position.


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150509 13f79535-47bb-0310-9956-ffa450edef68
2004-09-15 09:38:50 +00:00
Christoph Goller 862b9ea4a7 QueryParser can now handle minimumSimilarity parameter
of FuzzyQuery


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150507 13f79535-47bb-0310-9956-ffa450edef68
2004-09-14 13:46:25 +00:00
Christoph Goller 7e0155537a QueryParser can now handle minimumSimilarity parameter
of FuzzyQuery; FuzzyQuery extended to allow for non-fuzzy
prefixes.


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150506 13f79535-47bb-0310-9956-ffa450edef68
2004-09-14 13:45:15 +00:00
Daniel Naber 3eeda4437d Implement readResolve, needed for serializable "enumerations"
PR:31174
Submitted by:Todd VanderVeen


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150503 13f79535-47bb-0310-9956-ffa450edef68
2004-09-12 13:16:02 +00:00
Daniel Naber 54bfbc30de use the same amount of whitespace everywhere, no functional change
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150501 13f79535-47bb-0310-9956-ffa450edef68
2004-09-08 20:43:43 +00:00
Daniel Naber d31c31a84f add an assertEquals, as the variable was not used before
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150500 13f79535-47bb-0310-9956-ffa450edef68
2004-09-08 18:10:09 +00:00
Christoph Goller f4d99f0a7e Getters for analyzer and field added.
Some unnecessary variables deleted.


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150499 13f79535-47bb-0310-9956-ffa450edef68
2004-09-08 15:06:42 +00:00
Christoph Goller dfeed0220e Fix ArrayIndexOutOfBoundsExceptions
This patch is common to several patches
for QueryParser see e.g. Bug 9110 and it cannot have any
negative side effects.


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150498 13f79535-47bb-0310-9956-ffa450edef68
2004-09-08 13:31:55 +00:00
Daniel Naber 89d41cd8f1 remove the last calls of the deprecated Field API
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150497 13f79535-47bb-0310-9956-ffa450edef68
2004-09-07 18:26:36 +00:00
Daniel Naber 3305cee1b6 Remove all "final" declarations from FSDirectory. Doug agreed and nobody objected, so I commit it.
Submitted by: Mike Hearn


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150496 13f79535-47bb-0310-9956-ffa450edef68
2004-09-07 18:06:16 +00:00
Daniel Naber c3918f9fa0 replace two tabs by spaces
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150495 13f79535-47bb-0310-9956-ffa450edef68
2004-09-07 17:55:59 +00:00
Daniel Naber 9b0315169b don't call the deprecated Field API
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150494 13f79535-47bb-0310-9956-ffa450edef68
2004-09-06 22:29:22 +00:00
Daniel Naber 1d70de80d9 Undo my fix for bug 30985, as it fixes only part of the problem. Instead add a comment about this "bug" to the API documentation.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150493 13f79535-47bb-0310-9956-ffa450edef68
2004-09-06 22:09:13 +00:00
Daniel Naber e49eb20a32 don't call the deprecated Field API
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150492 13f79535-47bb-0310-9956-ffa450edef68
2004-09-06 22:01:49 +00:00
Daniel Naber 16239c65ca parse hexadecimal character references
PR: 30617
Submitted by: Dave Sparks


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150491 13f79535-47bb-0310-9956-ffa450edef68
2004-09-06 21:33:37 +00:00
Christoph Goller 60cee18ffa Patch (BUG# 31061) submitted by Paul Elschot reviewed by
Christoph Goller and applied


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150490 13f79535-47bb-0310-9956-ffa450edef68
2004-09-06 12:07:04 +00:00
Daniel Naber 4288bbe643 adding a getSort() method, as suggested by bug 30242, but unlike in the bug report it's called getSort(), not getSortFields(), as the set method is also called setSort(...)
PR: 30242


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150489 13f79535-47bb-0310-9956-ffa450edef68
2004-09-05 22:53:37 +00:00
Daniel Naber ce2cd2f194 don't mix spaces and tabs (but use spaces only), no functional change
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150488 13f79535-47bb-0310-9956-ffa450edef68
2004-09-05 22:49:26 +00:00
Daniel Naber a012f7cbfc start using the new Field API in the test cases
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150487 13f79535-47bb-0310-9956-ffa450edef68
2004-09-05 22:27:42 +00:00
Daniel Naber d3134cf171 use the new DateTools class to limit the date resolution and save the date in a readable format
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150485 13f79535-47bb-0310-9956-ffa450edef68
2004-09-05 21:47:57 +00:00
Daniel Naber bdcaaa7e62 test cases for the DateTools class
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150484 13f79535-47bb-0310-9956-ffa450edef68
2004-09-05 21:28:42 +00:00
Daniel Naber c7fbb991c3 Add a new class that supports converting dates to readable strings, with limited resolution. Other public methods let people limit the resolution of their dates.
DateField is not deprecated because it still has the advantage of slightly shorter fields in some cases.


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150483 13f79535-47bb-0310-9956-ffa450edef68
2004-09-05 21:27:29 +00:00
Daniel Naber 98ce298586 replace tabs by spaces
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150482 13f79535-47bb-0310-9956-ffa450edef68
2004-09-03 21:16:28 +00:00
Daniel Naber f085bc15f5 Fix toString() to print the escaped version of a query. Adapt some test cases, also comment in some test cases again, but there's still a TODO which someone should have a look at.
PR: 30985


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150481 13f79535-47bb-0310-9956-ffa450edef68
2004-09-03 21:12:22 +00:00
Daniel Naber c02126a21c Don't just silently delete the "index" directory if it exists but throw an error. Be a bit more verbose.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150480 13f79535-47bb-0310-9956-ffa450edef68
2004-09-02 21:45:23 +00:00
Daniel Naber bb8468bec6 use a FileReader and delete the comment that asks why it doesn't work - because it does now. also mention which encoding is expected.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150479 13f79535-47bb-0310-9956-ffa450edef68
2004-09-02 21:33:57 +00:00
Daniel Naber dcc9f58e24 start using the non-deprecated API
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150478 13f79535-47bb-0310-9956-ffa450edef68
2004-09-02 21:23:14 +00:00