File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -623,8 +623,10 @@ async def create_text_index(
623623 _validate_cypher_identifier (label , "label" )
624624 if isinstance (properties , str ):
625625 prop_list = [properties ]
626- else :
626+ elif isinstance ( properties , list | tuple ) :
627627 prop_list = list (properties )
628+ else :
629+ raise ValueError ("'properties' must be a property name (str) or a list of property names" )
628630 if not prop_list :
629631 raise ValueError ("'properties' must contain at least one property name" )
630632 for prop in prop_list :
@@ -785,6 +787,12 @@ async def hybrid_text_vector_search(
785787
786788 Returns:
787789 List of :class:`HybridResult` ordered by RRF score descending.
790+
791+ Note:
792+ A full-text index covering *label* **must exist** before calling this
793+ method — create one with :meth:`create_text_index` or a
794+ ``CREATE TEXT INDEX`` Cypher statement. Calling this method on a
795+ label without a text index returns an empty list.
788796 """
789797 from coordinode ._proto .coordinode .v1 .query .text_pb2 import ( # type: ignore[import]
790798 HybridTextVectorSearchRequest ,
Original file line number Diff line number Diff line change 151151 " from coordinode import CoordinodeClient\n " ,
152152 " \n " ,
153153 " client = CoordinodeClient(COORDINODE_ADDR)\n " ,
154- " client.health()\n " ,
154+ " if not client.health():\n " ,
155+ " raise RuntimeError(f\" Health check failed for {COORDINODE_ADDR}\" )\n " ,
155156 " print(f\" Connected to {COORDINODE_ADDR}\" )\n " ,
156157 " else:\n " ,
157158 " try:\n " ,
164165 " from coordinode import CoordinodeClient\n " ,
165166 " \n " ,
166167 " client = CoordinodeClient(COORDINODE_ADDR)\n " ,
167- " client.health()\n " ,
168+ " if not client.health():\n " ,
169+ " raise RuntimeError(f\" Health check failed for {COORDINODE_ADDR}\" )\n " ,
168170 " print(f\" Connected to {COORDINODE_ADDR}\" )\n " ,
169171 " else:\n " ,
170172 " # No server available — use the embedded in-process engine.\n " ,
Original file line number Diff line number Diff line change 170170 " from coordinode import CoordinodeClient\n " ,
171171 " \n " ,
172172 " client = CoordinodeClient(COORDINODE_ADDR)\n " ,
173- " client.health()\n " ,
173+ " if not client.health():\n " ,
174+ " raise RuntimeError(f\" Health check failed for {COORDINODE_ADDR}\" )\n " ,
174175 " print(f\" Connected to {COORDINODE_ADDR}\" )\n " ,
175176 " else:\n " ,
176177 " try:\n " ,
183184 " from coordinode import CoordinodeClient\n " ,
184185 " \n " ,
185186 " client = CoordinodeClient(COORDINODE_ADDR)\n " ,
186- " client.health()\n " ,
187+ " if not client.health():\n " ,
188+ " raise RuntimeError(f\" Health check failed for {COORDINODE_ADDR}\" )\n " ,
187189 " print(f\" Connected to {COORDINODE_ADDR}\" )\n " ,
188190 " else:\n " ,
189191 " # No server available — use the embedded in-process engine.\n " ,
You can’t perform that action at this time.
0 commit comments