Procházet zdrojové kódy

merged rel21 branch (up to r4845) back into trunk

git-svn-id: svn://svn.sphinxsearch.com/sphinx/trunk@4846 406a0c4d-033a-0410-8de8-e80135713968
tomat před 11 roky
rodič
revize
e54e4db87f
3 změnil soubory, kde provedl 22 přidání a 6 odebrání
  1. 3 6
      src/sphinxsearch.cpp
  2. 0 0
      test/test_148/model.bin
  3. 19 0
      test/test_148/test.xml

+ 3 - 6
src/sphinxsearch.cpp

@@ -434,7 +434,7 @@ protected:
 };
 };
 
 
 template<>
 template<>
-class TermAcceptor_c<TERM_POS_FIELD_LIMIT> : protected HitPointer
+class TermAcceptor_c<TERM_POS_FIELD_LIMIT> : protected HitPointer, public ISphNoncopyable
 {
 {
 public:
 public:
 	TermAcceptor_c ( ISphQword *, const XQNode_t * pNode, const ISphQwordSetup & )
 	TermAcceptor_c ( ISphQword *, const XQNode_t * pNode, const ISphQwordSetup & )
@@ -442,12 +442,9 @@ public:
 	{}
 	{}
 protected:
 protected:
 	inline bool					IsAcceptableHit ( const ExtHit_t * ) const;
 	inline bool					IsAcceptableHit ( const ExtHit_t * ) const;
-	inline void					Reset()
-	{
-		m_iMaxFieldPos = 0;
-	}
+	inline void					Reset() {}
 private:
 private:
-	int							m_iMaxFieldPos;
+	const int					m_iMaxFieldPos;
 };
 };
 
 
 template<>
 template<>

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 0
test/test_148/model.bin


+ 19 - 0
test/test_148/test.xml

@@ -10,6 +10,7 @@ indexer
 searchd
 searchd
 {
 {
 	<searchd_settings/>
 	<searchd_settings/>
+	workers = threads
 }
 }
 
 
 source test
 source test
@@ -121,6 +122,18 @@ index idx_blend_kw
 	blend_chars 	= +, %, -
 	blend_chars 	= +, %, -
 	dict			= keywords
 	dict			= keywords
 }
 }
+
+index rt
+{
+	type = rt
+	path			= <data_path/>/rt
+	docinfo = extern
+	rt_mem_limit = 128k
+	rt_attr_uint	= idd
+	rt_field = title
+	rt_field = description
+	dict = keywords
+}
 </config>
 </config>
 
 
 <db_create>
 <db_create>
@@ -172,6 +185,12 @@ CREATE TABLE start_end_table
 	<sphinxql>select * from idx_blend_crc where match (' x-com NEAR/10 valid')</sphinxql>
 	<sphinxql>select * from idx_blend_crc where match (' x-com NEAR/10 valid')</sphinxql>
 	<sphinxql>select * from idx_blend_kw where match (' x-com NEAR/10 valid ')</sphinxql>
 	<sphinxql>select * from idx_blend_kw where match (' x-com NEAR/10 valid ')</sphinxql>
 	<sphinxql>CALL SNIPPETS ( 'dummy1 dummy1 valid dummy1 dummy1 dummy1 X-COM, dummy1', 'idx_blend_kw', 'x-com NEAR/10 valid', 1 as query_mode )</sphinxql>
 	<sphinxql>CALL SNIPPETS ( 'dummy1 dummy1 valid dummy1 dummy1 dummy1 X-COM, dummy1', 'idx_blend_kw', 'x-com NEAR/10 valid', 1 as query_mode )</sphinxql>
+	
+	<!-- regression of field position limit vs RT index -->
+	<sphinxql>REPLACE INTO rt (id, title, description) VALUES (1, 'This is a simple test', 'This is a longer description of a simple test')</sphinxql>
+	<sphinxql>SELECT id FROM rt WHERE MATCH('@description test')</sphinxql>
+	<sphinxql>SELECT id FROM rt WHERE MATCH('@description[10] test')</sphinxql>
+	
 </sphqueries>
 </sphqueries>
 
 
 <custom_insert><![CDATA[
 <custom_insert><![CDATA[

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů