File tree 5 files changed +11
-8
lines changed
5 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -50,21 +50,22 @@ fields:
50
50
` ` `
51
51
52
52
#### Example Usage
53
+ These examples reference [provided sample data](sample-data/).
53
54
54
55
` ` ` bash
55
56
# load in a pickled dataframe with
56
- redisvl load -s sample.yml -d embeddings .pkl
57
+ redisvl load -s sample-data/sample .yml -d sample-data/pandas-sample .pkl
57
58
```
58
59
59
60
``` bash
60
61
# load in a pickled dataframe to a specific address and port
61
- redisvl load -s sample.yml -d embeddings .pkl -h 127.0.0.1 -p 6379
62
+ redisvl load -s sample-data/sample .yml -d sample-data/pandas-sample .pkl -h 127.0.0.1 -p 6379
62
63
```
63
64
64
65
``` bash
65
66
# load in a pickled dataframe to a specific
66
67
# address and port and with password
67
- redisvl load -s sample.yml -d embeddings .pkl -h 127.0.0.1 -p 6379 -p supersecret
68
+ redisvl load -s sample-data/sample .yml -d sample-data/pandas-sample .pkl -h 127.0.0.1 -p 6379 -p supersecret
68
69
```
69
70
70
71
### Support
@@ -88,7 +89,7 @@ Install the Python requirements listed in `requirements.txt`.
88
89
``` bash
89
90
git clone https://github.com/RedisVentures/data-loader.git
90
91
cd redisvl
91
- pip install .
92
+ pip install -e .
92
93
```
93
94
94
95
### Creating Input Data
Original file line number Diff line number Diff line change @@ -84,5 +84,6 @@ async def create(
84
84
definition = IndexDefinition (prefix = [self .prefix ], index_type = storage_type ),
85
85
)
86
86
87
- async def delete (self ):
88
- await self .redis_conn .ft (self .index_name ).dropindex (delete_documents = True )
87
+ async def delete (self , dd : bool = True ):
88
+ # Delete the search index
89
+ await self .redis_conn .ft (self .index_name ).dropindex (delete_documents = dd )
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ def create_vector_query(
9
9
number_of_results : int = 20 ,
10
10
vector_field_name : str = "vector" ,
11
11
tags : str = "*" ,
12
- ):
12
+ ) -> Query :
13
13
base_query = f"{ tags } =>[{ search_type } { number_of_results } @{ vector_field_name } $vector AS vector_score]"
14
14
return (
15
15
Query (base_query )
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ def _create_vector_field(
88
88
algorithm : str = "FLAT" ,
89
89
datatype : str = "FLOAT32" ,
90
90
distance_metric : str = "COSINE" ,
91
- initial_cap : int = 1000000 ,
91
+ initial_cap : int = 20000 ,
92
92
block_size : int = 1000 ,
93
93
m : int = 16 ,
94
94
ef_construction : int = 200 ,
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ fields:
14
14
separator : " |"
15
15
vector :
16
16
vector :
17
+ initial_cap : 20000
17
18
datatype : " float32"
18
19
algorithm : " flat"
19
20
dims : 768
You can’t perform that action at this time.
0 commit comments