lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Øie <k...@gan.no>
Subject Problems understanding RangeQuery...
Date Sat, 10 Aug 2002 15:47:24 GMT
Hi, i have a problem with understanding RangeQueries in Lucene-1.2:

I have created an index with posts that has the field W_PUBLISHING_YEAR
which contains the YYYY year of publishing. After indexing i loop through
the terms and finds that i have the following terms present in the index:

1923,1925,1926,1930,1933,1935,1936,1938,1942,1943,1945,1946,1947,1948,1949,1
950,1951,1952,1953,1954,1955,1956,1957,1958,1959,1960,1961,1962,1963,1964,19
65,1966,1967,1968,1969,1970,1971,1972,1973,1974,1975,1976,1977,1978,1979,198
0,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995
,1996,1997,1998,1999,2000,2001,2002,2003,2004,2010,2018,2097 in 232290
documents.

Then i run these queries on the index "W_PUBLISHING_YEAR:[1971-1979]" and
"W_PUBLISHING_YEAR:[2000-2002]" and both queries gives me some strange
results:


W_PUBLISHING_YEAR:[1971-1979]

found={1975, 1974, 1973, 1972, 1999, 1998, 1997, 1996, 1995, 1994, 1993,
2018, 1992, 1991, 1990, 2010, 1989, 1988, 1987, 1986, 1985, 1984, 1983,
1982, 1981, 1980, 2004, 2003, 2002, 2001, 2097, 2000, 1979, 1978, 1977,
1976} in 150793 matching documents.


W_PUBLISHING_YEAR:[2000-2002]

found={2002, 2001, 2097, 2010, 2018, 2004, 2003} in 10756 matching
documents.



Is there something i do wrong here? How is the RangeQuery supposed to work?


--
To unsubscribe, e-mail:   <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>


Mime
View raw message