Apache Lucene is a high-performance, full-featured text search engine library written entirely in Java. It is a technology suitable for nearly any application that requires full-text search, especially cross-platform.
39. µ¹ÅÅË÷Òý Îĵµ A £º This is a dog B £º This dog is a kind of animal ÈçÓÒͼ ͨ¹ý±È½Ï£º Ò»°ãµÄË÷Òý½á¹¹½¨Á¢µÄÊÇÒ»ÖÖ¡°Îĵµµ½µ¥´Ê¡±µÄÓ³Éä¹Øϵ£¬ ¶øµ¹ÅÅË÷Òý½¨Á¢µÄÔòÊÇÒ»ÖÖ¡°µ¥´Êµ½Îĵµ¡±µÄÓ³Éä¹Øϵ¡£ Óû§ÔÚ½øÐмìË÷ʱ£¬¶¼ÊÇÊäÈë¹Ø¼ü×Ö½øÐвéѯ£¬Èç¹ûʹÓÃÒ»°ãµÄË÷Òý½á¹¹£¬ÔÚ²éѯijһ¹Ø¼ü×ÖʱÐèÒª±éÀúËùÓÐË÷Òý£¬Ë÷ÒýÁ¿´óʱ£¬Ð§Âʲ 1 B kind 1 kind B 1 dog B 1 B animal 1,1 A,B dog ³öÏÖ´ÎÊý ³öÏÖµÄÎĵµ µ¥´Ê µ¹ÅÅË÷Òý½á¹¹ 1 animal B 1 dog A ³öÏÖ´ÎÊý ³öÏÖµ¥´Ê Îĵµ±àºÅ Ò»°ãË÷Òý½á¹¹
57. ¹¹½¨ Query °´´ÊÌõËÑË÷ ¨C TermQuery Term term = new Term(¡°contents¡±, ¡°java¡±); Query query = new TermQuery(term); BooleanQuery public void add(BooleanClause clause) RangeQuery public RangeQuery(Term lowerTerm, Term upperTerm, boolean inclusive) PrefixQuery public PrefixQuery(Term prefix) ¶à¹Ø¼ü×ÖËÑË÷ -- PhraseQuery public void add(Term term) public void setSlop(int s) // Sets the number of other words permitted between words in //query phrase. If zero, then this is an exact phrase search. Ïà½ü´ÊÓïµÄËÑË÷ ¨C FuzzyQuery ͨÅä·ûËÑË÷ ¨C WildcardQuery // *, ? ¡¡ ½âÎöÓû§ÊäÈë×Ö·û´® -- QueryParser