lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ehatc...@apache.org
Subject cvs commit: jakarta-lucene/src/test/org/apache/lucene/analysis TestStopAnalyzer.java
Date Mon, 08 Dec 2003 16:16:32 GMT
ehatcher    2003/12/08 08:16:32

  Modified:    src/test/org/apache/lucene/analysis TestStopAnalyzer.java
  Log:
  remove failing StopAnalyzer tests since the positional change was reverted
  
  Revision  Changes    Path
  1.2       +1 -30     jakarta-lucene/src/test/org/apache/lucene/analysis/TestStopAnalyzer.java
  
  Index: TestStopAnalyzer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/test/org/apache/lucene/analysis/TestStopAnalyzer.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestStopAnalyzer.java	28 Nov 2003 02:03:14 -0000	1.1
  +++ TestStopAnalyzer.java	8 Dec 2003 16:16:32 -0000	1.2
  @@ -31,30 +31,6 @@
     }
   
   
  -  public void testNoHoles() throws Exception {
  -    Token[] tokens = tokensFromAnalyzer(stopAnalyzer,
  -                                        "non-stop words");
  -
  -    assertEquals(3, tokens.length);
  -
  -    // ensure all words are in successive positions
  -    assertEquals("non", 1, tokens[0].getPositionIncrement());
  -    assertEquals("stop", 1, tokens[1].getPositionIncrement());
  -    assertEquals("words", 1, tokens[2].getPositionIncrement());
  -  }
  -
  -  public void testHoles() throws Exception {
  -    Token[] tokens = tokensFromAnalyzer(stopAnalyzer,
  -                                        "the stop words are here");
  -
  -    assertEquals(3, tokens.length);
  -
  -    // check for the holes noted by position gaps
  -    assertEquals("stop", 2, tokens[0].getPositionIncrement());
  -    assertEquals("words", 1, tokens[1].getPositionIncrement());
  -    assertEquals("here", 2, tokens[2].getPositionIncrement());
  -  }
  -
     public void testPhraseQuery() throws Exception {
       RAMDirectory directory = new RAMDirectory();
       IndexWriter writer = new IndexWriter(directory, stopAnalyzer, true);
  @@ -72,15 +48,10 @@
       Hits hits = searcher.search(query);
       assertEquals(1, hits.length());
   
  -    // incorrect attempt at exact phrase query over stop word hole
  +    // currently StopAnalyzer does not leave "holes", so this matches.
       query = new PhraseQuery();
       query.add(new Term("field", "words"));
       query.add(new Term("field", "here"));
  -    hits = searcher.search(query);
  -    assertEquals(0, hits.length());
  -
  -    // add some slop, and match over the hole
  -    query.setSlop(1);
       hits = searcher.search(query);
       assertEquals(1, hits.length());
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message