Index
Index
Usage
The Index
uses blocking methods, and and should be used when using the Client
. When you create
a new index with the Client
it will create an Index
instance.
Index
API
Bases: _BaseIndex
Index class gives access to all indexes routes and child routes.
https://docs.meilisearch.com/reference/api/indexes.html
Source code in meilisearch_python_sdk/index.py
4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 |
|
__init__(http_client, uid, primary_key=None, created_at=None, updated_at=None, plugins=None, json_handler=None, *, hits_type=JsonDict)
Class initializer.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
http_client
|
Client
|
An instance of the Client. This automatically gets passed by the Client when creating and Index instance. |
required |
uid
|
str
|
The index's unique identifier. |
required |
primary_key
|
str | None
|
The primary key of the documents. Defaults to None. |
None
|
created_at
|
str | datetime | None
|
The date and time the index was created. Defaults to None. |
None
|
updated_at
|
str | datetime | None
|
The date and time the index was last updated. Defaults to None. |
None
|
plugins
|
IndexPlugins | None
|
Optional plugins can be provided to extend functionality. |
None
|
json_handler
|
BuiltinHandler | OrjsonHandler | UjsonHandler | None
|
The module to use for json operations. The options are BuiltinHandler (uses the json module from the standard library), OrjsonHandler (uses orjson), or UjsonHandler (uses ujson). Note that in order use orjson or ujson the corresponding extra needs to be included. Default: BuiltinHandler. |
None
|
hits_type
|
Any
|
Allows for a custom type to be passed to use for hits. Defaults to JsonDict |
JsonDict
|
Source code in meilisearch_python_sdk/index.py
4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 |
|
add_documents(documents, primary_key=None, *, compress=False)
Add documents to the index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
documents
|
Sequence[JsonMapping]
|
List of documents. |
required |
primary_key
|
str | None
|
The primary key of the documents. This will be ignored if already set. Defaults to None. |
None
|
compress
|
bool
|
If set to True the data will be sent in gzip format. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> documents = [ >>> {"id": 1, "title": "Movie 1", "genre": "comedy"}, >>> {"id": 2, "title": "Movie 2", "genre": "drama"}, >>> ] >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.add_documents(documents)
Source code in meilisearch_python_sdk/index.py
5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 |
|
add_documents_from_directory(directory_path, *, primary_key=None, document_type='json', csv_delimiter=None, combine_documents=True, compress=False)
Load all json files from a directory and add the documents to the index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
directory_path
|
Path | str
|
Path to the directory that contains the json files. |
required |
primary_key
|
str | None
|
The primary key of the documents. This will be ignored if already set. Defaults to None. |
None
|
document_type
|
str
|
The type of document being added. Accepted types are json, csv, and ndjson. For csv files the first row of the document should be a header row contining the field names, and ever for should have a title. |
'json'
|
csv_delimiter
|
str | None
|
A single ASCII character to specify the delimiter for csv files. This can only be used if the file is a csv file. Defaults to comma. |
None
|
combine_documents
|
bool
|
If set to True this will combine the documents from all the files before indexing them. Defaults to True. |
True
|
compress
|
bool
|
If set to True the data will be sent in gzip format. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
list[TaskInfo]
|
The details of the task status. |
Raises:
Type | Description |
---|---|
InvalidDocumentError
|
If the docucment is not a valid format for Meilisearch. |
MeilisearchError
|
If the file path is not valid |
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from pathlib import Path >>> from meilisearch_python_sdk import Client >>> directory_path = Path("/path/to/directory/containing/files") >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.add_documents_from_directory(directory_path)
Source code in meilisearch_python_sdk/index.py
5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 |
|
add_documents_from_directory_in_batches(directory_path, *, batch_size=1000, primary_key=None, document_type='json', csv_delimiter=None, combine_documents=True, compress=False)
Load all json files from a directory and add the documents to the index in batches.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
directory_path
|
Path | str
|
Path to the directory that contains the json files. |
required |
batch_size
|
int
|
The number of documents that should be included in each batch. Defaults to 1000. |
1000
|
primary_key
|
str | None
|
The primary key of the documents. This will be ignored if already set. Defaults to None. |
None
|
document_type
|
str
|
The type of document being added. Accepted types are json, csv, and ndjson. For csv files the first row of the document should be a header row contining the field names, and ever for should have a title. |
'json'
|
csv_delimiter
|
str | None
|
A single ASCII character to specify the delimiter for csv files. This can only be used if the file is a csv file. Defaults to comma. |
None
|
combine_documents
|
bool
|
If set to True this will combine the documents from all the files before indexing them. Defaults to True. |
True
|
compress
|
bool
|
If set to True the data will be sent in gzip format. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
list[TaskInfo]
|
List of update ids to track the action. |
Raises:
Type | Description |
---|---|
InvalidDocumentError
|
If the docucment is not a valid format for Meilisearch. |
MeilisearchError
|
If the file path is not valid |
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from pathlib import Path >>> from meilisearch_python_sdk import Client >>> directory_path = Path("/path/to/directory/containing/files") >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.add_documents_from_directory_in_batches(directory_path)
Source code in meilisearch_python_sdk/index.py
5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 |
|
add_documents_from_file(file_path, primary_key=None, *, compress=False)
Add documents to the index from a json file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file_path
|
Path | str
|
Path to the json file. |
required |
primary_key
|
str | None
|
The primary key of the documents. This will be ignored if already set. Defaults to None. |
None
|
compress
|
bool
|
If set to True the data will be sent in gzip format. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task status. |
Raises:
Type | Description |
---|---|
InvalidDocumentError
|
If the docucment is not a valid format for Meilisearch. |
MeilisearchError
|
If the file path is not valid |
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from pathlib import Path >>> from meilisearch_python_sdk import Client >>> file_path = Path("/path/to/file.json") >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.add_documents_from_file(file_path)
Source code in meilisearch_python_sdk/index.py
5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 |
|
add_documents_from_file_in_batches(file_path, *, batch_size=1000, primary_key=None, csv_delimiter=None, compress=False)
Adds documents form a json file in batches to reduce RAM usage with indexing.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file_path
|
Path | str
|
Path to the json file. |
required |
batch_size
|
int
|
The number of documents that should be included in each batch. Defaults to 1000. |
1000
|
primary_key
|
str | None
|
The primary key of the documents. This will be ignored if already set. Defaults to None. |
None
|
csv_delimiter
|
str | None
|
A single ASCII character to specify the delimiter for csv files. This can only be used if the file is a csv file. Defaults to comma. |
None
|
compress
|
bool
|
If set to True the data will be sent in gzip format. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
list[TaskInfo]
|
List of update ids to track the action. |
Raises:
Type | Description |
---|---|
InvalidDocumentError
|
If the docucment is not a valid format for Meilisearch. |
MeilisearchError
|
If the file path is not valid |
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from pathlib import Path >>> from meilisearch_python_sdk import Client >>> file_path = Path("/path/to/file.json") >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.add_documents_from_file_in_batches(file_path)
Source code in meilisearch_python_sdk/index.py
5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 |
|
add_documents_from_raw_file(file_path, primary_key=None, *, csv_delimiter=None, compress=False)
Directly send csv or ndjson files to Meilisearch without pre-processing.
The can reduce RAM usage from Meilisearch during indexing, but does not include the option for batching.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file_path
|
Path | str
|
The path to the file to send to Meilisearch. Only csv and ndjson files are allowed. |
required |
primary_key
|
str | None
|
The primary key of the documents. This will be ignored if already set. Defaults to None. |
None
|
csv_delimiter
|
str | None
|
A single ASCII character to specify the delimiter for csv files. This can only be used if the file is a csv file. Defaults to comma. |
None
|
compress
|
bool
|
If set to True the data will be sent in gzip format. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task. |
Raises:
Type | Description |
---|---|
ValueError
|
If the file is not a csv or ndjson file, or if a csv_delimiter is sent for a non-csv file. |
MeilisearchError
|
If the file path is not valid |
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from pathlib import Path >>> from meilisearch_python_sdk import Client >>> file_path = Path("/path/to/file.csv") >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.add_documents_from_raw_file(file_path)
Source code in meilisearch_python_sdk/index.py
5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 |
|
add_documents_in_batches(documents, *, batch_size=1000, primary_key=None, compress=False)
Adds documents in batches to reduce RAM usage with indexing.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
documents
|
Sequence[JsonMapping]
|
List of documents. |
required |
batch_size
|
int
|
The number of documents that should be included in each batch. Defaults to 1000. |
1000
|
primary_key
|
str | None
|
The primary key of the documents. This will be ignored if already set. Defaults to None. |
None
|
compress
|
bool
|
If set to True the data will be sent in gzip format. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
list[TaskInfo]
|
List of update ids to track the action. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> >>> documents = [ >>> {"id": 1, "title": "Movie 1", "genre": "comedy"}, >>> {"id": 2, "title": "Movie 2", "genre": "drama"}, >>> ] >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.add_documents_in_batches(documents)
Source code in meilisearch_python_sdk/index.py
5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 |
|
create(http_client, uid, primary_key=None, *, settings=None, wait=True, timeout_in_ms=None, plugins=None, json_handler=None, hits_type=JsonDict)
classmethod
Creates a new index.
In general this method should not be used directly and instead the index should be created
through the Client
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
http_client
|
Client
|
An instance of the Client. This automatically gets passed by the Client when creating an Index instance. |
required |
uid
|
str
|
The index's unique identifier. |
required |
primary_key
|
str | None
|
The primary key of the documents. Defaults to None. |
None
|
settings
|
MeilisearchSettings | None
|
Settings for the index. The settings can also be updated independently of creating the index. The advantage to updating them here is updating the settings after adding documents will cause the documents to be re-indexed. Because of this it will be faster to update them before adding documents. Defaults to None (i.e. default Meilisearch index settings). |
None
|
wait
|
bool
|
If set to True and settings are being updated, the index will be returned after the settings update has completed. If False it will not wait for settings to complete. Default: True |
True
|
timeout_in_ms
|
int | None
|
Amount of time in milliseconds to wait before raising a
MeilisearchTimeoutError. |
None
|
plugins
|
IndexPlugins | None
|
Optional plugins can be provided to extend functionality. |
None
|
json_handler
|
BuiltinHandler | OrjsonHandler | UjsonHandler | None
|
The module to use for json operations. The options are BuiltinHandler (uses the json module from the standard library), OrjsonHandler (uses orjson), or UjsonHandler (uses ujson). Note that in order use orjson or ujson the corresponding extra needs to be included. Default: BuiltinHandler. |
None
|
hits_type
|
Any
|
Allows for a custom type to be passed to use for hits. Defaults to JsonDict |
JsonDict
|
Returns:
Type | Description |
---|---|
Self
|
An instance of Index containing the information of the newly created index. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = index.create(client, "movies")
Source code in meilisearch_python_sdk/index.py
4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 |
|
delete()
Deletes the index.
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.delete()
Source code in meilisearch_python_sdk/index.py
4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 |
|
delete_all_documents()
Delete all documents from the index.
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task status. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.delete_all_document()
Source code in meilisearch_python_sdk/index.py
6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 |
|
delete_document(document_id)
Delete one document from the index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
document_id
|
str
|
Unique identifier of the document. |
required |
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task status. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.delete_document("1234")
Source code in meilisearch_python_sdk/index.py
6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 |
|
delete_documents(ids)
Delete multiple documents from the index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ids
|
list[str]
|
List of unique identifiers of documents. |
required |
Returns:
Type | Description |
---|---|
TaskInfo
|
List of update ids to track the action. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.delete_documents(["1234", "5678"])
Source code in meilisearch_python_sdk/index.py
6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 |
|
delete_documents_by_filter(filter)
Delete documents from the index by filter.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filter
|
Filter
|
The filter value information. |
required |
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task status. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.delete_documents_by_filter("genre=horor"))
Source code in meilisearch_python_sdk/index.py
6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 |
|
delete_documents_in_batches_by_filter(filters)
Delete batches of documents from the index by filter.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filters
|
list[str | list[str | list[str]]]
|
A list of filter value information. |
required |
Returns:
Type | Description |
---|---|
list[TaskInfo]
|
The a list of details of the task statuses. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.delete_documents_in_batches_by_filter( >>> [ >>> "genre=horor"), >>> "release_date=1520035200"), >>> ] >>> )
Source code in meilisearch_python_sdk/index.py
6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 |
|
delete_if_exists()
Delete the index if it already exists.
Returns:
Type | Description |
---|---|
bool
|
True if the index was deleted or False if not. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.delete_if_exists()
Source code in meilisearch_python_sdk/index.py
4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 |
|
edit_documents(function, *, context=None, filter=None)
Edit documents with a function.
Edit documents is only available in Meilisearch >= v1.10.0, and is experimental in Meilisearch v1.10.0. In order to use this feature you first need to enable it by sending a PATCH request to /experimental-features with { "editDocumentsByFunction": true }.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
function
|
str
|
Rhai function to use to update the documents. |
required |
context
|
JsonDict | None
|
Parameters to use in the function. Defaults to None. |
None
|
filter
|
str | None
|
Filter the documents before applying the function. Defaults to None. |
None
|
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task. |
Raises:
Type | Description |
---|---|
MeilisearchError
|
If the file path is not valid |
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples
>>> from meilisearch_python_sdk import Client
>>> client = Client("http://localhost.com", "masterKey")
>>> index = client.index("movies")
>>> index.edit_documents("doc.title = ${doc.title.to_upper()}
")
Source code in meilisearch_python_sdk/index.py
5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 |
|
facet_search(query=None, *, facet_name, facet_query, offset=0, limit=20, filter=None, facets=None, attributes_to_retrieve=None, attributes_to_crop=None, crop_length=200, attributes_to_highlight=None, sort=None, show_matches_position=False, highlight_pre_tag='<em>', highlight_post_tag='</em>', crop_marker='...', matching_strategy='last', hits_per_page=None, page=None, attributes_to_search_on=None, show_ranking_score=False, show_ranking_score_details=False, ranking_score_threshold=None, vector=None, locales=None)
Search the index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
str | None
|
String containing the word(s) to search |
None
|
facet_name
|
str
|
The name of the facet to search |
required |
facet_query
|
str
|
The facet search value |
required |
offset
|
int
|
Number of documents to skip. Defaults to 0. |
0
|
limit
|
int
|
Maximum number of documents returned. Defaults to 20. |
20
|
filter
|
Filter | None
|
Filter queries by an attribute value. Defaults to None. |
None
|
facets
|
list[str] | None
|
Facets for which to retrieve the matching count. Defaults to None. |
None
|
attributes_to_retrieve
|
list[str] | None
|
Attributes to display in the returned documents. Defaults to ["*"]. |
None
|
attributes_to_crop
|
list[str] | None
|
Attributes whose values have to be cropped. Defaults to None. |
None
|
crop_length
|
int
|
The maximun number of words to display. Defaults to 200. |
200
|
attributes_to_highlight
|
list[str] | None
|
Attributes whose values will contain highlighted matching terms. Defaults to None. |
None
|
sort
|
list[str] | None
|
Attributes by which to sort the results. Defaults to None. |
None
|
show_matches_position
|
bool
|
Defines whether an object that contains information about the matches should be returned or not. Defaults to False. |
False
|
highlight_pre_tag
|
str
|
The opening tag for highlighting text. Defaults to . |
'<em>'
|
highlight_post_tag
|
str
|
The closing tag for highlighting text. Defaults to |
'</em>'
|
crop_marker
|
str
|
Marker to display when the number of words excedes the |
'...'
|
matching_strategy
|
Literal['all', 'last', 'frequency']
|
Specifies the matching strategy Meilisearch should use. Defaults to
|
'last'
|
hits_per_page
|
int | None
|
Sets the number of results returned per page. |
None
|
page
|
int | None
|
Sets the specific results page to fetch. |
None
|
attributes_to_search_on
|
list[str] | None
|
List of field names. Allow search over a subset of searchable attributes without modifying the index settings. Defaults to None. |
None
|
show_ranking_score
|
bool
|
If set to True the ranking score will be returned with each document in the search. Defaults to False. |
False
|
show_ranking_score_details
|
bool
|
If set to True the ranking details will be returned with each document in the search. Defaults to False. Note: This parameter can only be used with Meilisearch >= v1.3.0, and is experimental in Meilisearch v1.3.0. In order to use this feature in Meilisearch v1.3.0 you first need to enable the feature by sending a PATCH request to /experimental-features with { "scoreDetails": true }. Because this feature is experimental it may be removed or updated causing breaking changes in this library without a major version bump so use with caution. This feature became stable in Meiliseach v1.7.0. |
False
|
ranking_score_threshold
|
float | None
|
If set, no document whose _rankingScore is under the rankingScoreThreshold is returned. The value must be between 0.0 and 1.0. Defaults to None. |
None
|
vector
|
list[float] | None
|
List of vectors for vector search. Defaults to None. Note: This parameter can only be used with Meilisearch >= v1.3.0, and is experimental in Meilisearch v1.3.0. In order to use this feature in Meilisearch v1.3.0 you first need to enable the feature by sending a PATCH request to /experimental-features with { "vectorStore": true }. Because this feature is experimental it may be removed or updated causing breaking changes in this library without a major version bump so use with caution. |
None
|
locales
|
list[str] | None
|
Specifies the languages for the search. This parameter can only be used with Milisearch >= v1.10.0. Defaults to None letting the Meilisearch pick. |
None
|
Returns:
Type | Description |
---|---|
FacetSearchResults
|
Results of the search |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> search_results = index.search( >>> "Tron", >>> facet_name="genre", >>> facet_query="Sci-fi" >>> )
Source code in meilisearch_python_sdk/index.py
5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 |
|
fetch_info()
Gets the infromation about the index.
Returns:
Type | Description |
---|---|
Self
|
An instance of the AsyncIndex containing the retrieved information. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index_info = index.fetch_info()
Source code in meilisearch_python_sdk/index.py
4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 |
|
get_displayed_attributes()
Get displayed attributes of the index.
Returns:
Type | Description |
---|---|
list[str]
|
List containing the displayed attributes of the index. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> displayed_attributes = index.get_displayed_attributes()
Source code in meilisearch_python_sdk/index.py
6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 |
|
get_distinct_attribute()
Get distinct attribute of the index.
Returns:
Type | Description |
---|---|
str | None
|
String containing the distinct attribute of the index. If no distinct attribute
|
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> distinct_attribute = index.get_distinct_attribute()
Source code in meilisearch_python_sdk/index.py
6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 |
|
get_document(document_id)
Get one document with given document identifier.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
document_id
|
str
|
Unique identifier of the document. |
required |
Returns:
Type | Description |
---|---|
JsonDict
|
The document information |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> document = index.get_document("1234")
Source code in meilisearch_python_sdk/index.py
5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 |
|
get_documents(*, offset=0, limit=20, fields=None, filter=None)
Get a batch documents from the index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
offset
|
int
|
Number of documents to skip. Defaults to 0. |
0
|
limit
|
int
|
Maximum number of documents returnedd. Defaults to 20. |
20
|
fields
|
list[str] | None
|
Document attributes to show. If this value is None then all attributes are retrieved. Defaults to None. |
None
|
filter
|
Filter | None
|
Filter value information. Defaults to None. Note: This parameter can only be used with Meilisearch >= v1.2.0 |
None
|
Returns:
Type | Description |
---|---|
DocumentsInfo
|
Documents info. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> documents = index.get_documents()
Source code in meilisearch_python_sdk/index.py
5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 |
|
get_embedders()
Get embedder settings for the index.
Returns:
Type | Description |
---|---|
Embedders | None
|
Embedders for the index. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_async_client import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> embedders = await index.get_embedders()
Source code in meilisearch_python_sdk/index.py
7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 |
|
get_faceting()
Get faceting for the index.
Returns:
Type | Description |
---|---|
Faceting
|
Faceting for the index. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> faceting = index.get_faceting()
Source code in meilisearch_python_sdk/index.py
7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 |
|
get_filterable_attributes()
Get filterable attributes of the index.
Returns:
Type | Description |
---|---|
list[str] | None
|
List containing the filterable attributes of the index. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> filterable_attributes = index.get_filterable_attributes()
Source code in meilisearch_python_sdk/index.py
6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 |
|
get_localized_attributes()
Get localized attributes settings for the index.
Returns:
Type | Description |
---|---|
list[LocalizedAttributes] | None
|
Localized attributes for the index. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_async_client import AsyncClient >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> localized_attributes = await index.get_localized_attributes()
Source code in meilisearch_python_sdk/index.py
7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 |
|
get_non_separator_tokens()
Get non-separator token settings for the index.
Returns:
Type | Description |
---|---|
list[str]
|
Non-separator tokens for the index. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_async_client import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> non_separator_token_settings = index.get_non_separator_tokens()
Source code in meilisearch_python_sdk/index.py
7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 |
|
get_pagination()
Get pagination settings for the index.
Returns:
Type | Description |
---|---|
Pagination
|
Pagination for the index. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_async_client import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> pagination_settings = index.get_pagination()
Source code in meilisearch_python_sdk/index.py
7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 |
|
get_primary_key()
Get the primary key.
Returns:
Type | Description |
---|---|
str | None
|
The primary key for the documents in the index. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> primary_key = index.get_primary_key()
Source code in meilisearch_python_sdk/index.py
4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 |
|
get_proximity_precision()
Get proximity precision settings for the index.
Returns:
Type | Description |
---|---|
ProximityPrecision
|
Proximity precision for the index. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_async_client import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> proximity_precision = index.get_proximity_precision()
Source code in meilisearch_python_sdk/index.py
7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 |
|
get_ranking_rules()
Get ranking rules of the index.
Returns:
Type | Description |
---|---|
list[str]
|
List containing the ranking rules of the index. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> ranking_rules = index.get_ranking_rules()
Source code in meilisearch_python_sdk/index.py
6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 |
|
get_search_cutoff_ms()
Get search cutoff time in ms.
Returns:
Type | Description |
---|---|
int | None
|
Integer representing the search cutoff time in ms, or None. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_async_client import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> search_cutoff_ms_settings = index.get_search_cutoff_ms()
Source code in meilisearch_python_sdk/index.py
7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 |
|
get_searchable_attributes()
Get searchable attributes of the index.
Returns:
Type | Description |
---|---|
list[str]
|
List containing the searchable attributes of the index. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> searchable_attributes = index.get_searchable_attributes()
Source code in meilisearch_python_sdk/index.py
6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 |
|
get_separator_tokens()
Get separator token settings for the index.
Returns:
Type | Description |
---|---|
list[str]
|
Separator tokens for the index. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_async_client import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> separator_token_settings = index.get_separator_tokens()
Source code in meilisearch_python_sdk/index.py
7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 |
|
get_settings()
Get settings of the index.
Returns:
Type | Description |
---|---|
MeilisearchSettings
|
Settings of the index. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> settings = index.get_settings()
Source code in meilisearch_python_sdk/index.py
6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 |
|
get_sortable_attributes()
Get sortable attributes of the AsyncIndex.
Returns:
Type | Description |
---|---|
list[str]
|
List containing the sortable attributes of the AsyncIndex. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> sortable_attributes = index.get_sortable_attributes()
Source code in meilisearch_python_sdk/index.py
7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 |
|
get_stats()
Get stats of the index.
Returns:
Type | Description |
---|---|
IndexStats
|
Stats of the index. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> stats = index.get_stats()
Source code in meilisearch_python_sdk/index.py
4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 |
|
get_stop_words()
Get stop words of the index.
Returns:
Type | Description |
---|---|
list[str] | None
|
List containing the stop words of the index. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> stop_words = index.get_stop_words()
Source code in meilisearch_python_sdk/index.py
6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 |
|
get_synonyms()
Get synonyms of the index.
Returns:
Type | Description |
---|---|
dict[str, list[str]] | None
|
The synonyms of the index. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> synonyms = index.get_synonyms()
Source code in meilisearch_python_sdk/index.py
6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 |
|
get_typo_tolerance()
Get typo tolerance for the index.
Returns:
Type | Description |
---|---|
TypoTolerance
|
TypoTolerance for the index. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> sortable_attributes = index.get_typo_tolerance()
Source code in meilisearch_python_sdk/index.py
7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 |
|
get_word_dictionary()
Get word dictionary settings for the index.
Returns:
Type | Description |
---|---|
list[str]
|
Word dictionary for the index. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_async_client import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> word_dictionary = index.get_word_dictionary()
Source code in meilisearch_python_sdk/index.py
7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 |
|
reset_displayed_attributes()
Reset displayed attributes of the index to default values.
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task status. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.reset_displayed_attributes()
Source code in meilisearch_python_sdk/index.py
6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 |
|
reset_distinct_attribute()
Reset distinct attribute of the index to default values.
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task status. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.reset_distinct_attributes()
Source code in meilisearch_python_sdk/index.py
6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 |
|
reset_embedders()
Reset an index's embedders settings to the default value.
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task status. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_async_client import Client >>> client = AsyncClient("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.reset_embedders()
Source code in meilisearch_python_sdk/index.py
7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 |
|
reset_faceting()
Reset an index's faceting settings to their default value.
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task status. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.reset_faceting()
Source code in meilisearch_python_sdk/index.py
7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 |
|
reset_filterable_attributes()
Reset filterable attributes of the index to default values.
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task status. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.reset_filterable_attributes()
Source code in meilisearch_python_sdk/index.py
7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 |
|
reset_localized_attributes()
Reset an index's localized attributes settings to the default value.
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task status. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_async_client import AsyncClient >>> Client("http://localhost.com", "masterKey") as client: >>> index = client.index("movies") >>> index.reset_localized_attributes()
Source code in meilisearch_python_sdk/index.py
7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 |
|
reset_non_separator_tokens()
Reset an index's non-separator tokens settings to the default value.
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task status. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_async_client import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.reset_non_separator_tokens()
Source code in meilisearch_python_sdk/index.py
7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 |
|
reset_pagination()
Reset an index's pagination settings to their default value.
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task status. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_async_client import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.reset_pagination()
Source code in meilisearch_python_sdk/index.py
7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 |
|
reset_proximity_precision()
Reset an index's proximity precision settings to the default value.
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task status. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_async_client import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.reset_proximity_precision()
Source code in meilisearch_python_sdk/index.py
7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 |
|
reset_ranking_rules()
Reset ranking rules of the index to default values.
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task status. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.reset_ranking_rules()
Source code in meilisearch_python_sdk/index.py
6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 |
|
reset_search_cutoff_ms()
Reset the search cutoff time to the default value.
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task status. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_async_client import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.reset_search_cutoff_ms()
Source code in meilisearch_python_sdk/index.py
7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 |
|
reset_searchable_attributes()
Reset searchable attributes of the index to default values.
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task status. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.reset_searchable_attributes()
Source code in meilisearch_python_sdk/index.py
6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 |
|
reset_separator_tokens()
Reset an index's separator tokens settings to the default value.
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task status. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_async_client import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.reset_separator_tokens()
Source code in meilisearch_python_sdk/index.py
7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 |
|
reset_settings()
Reset settings of the index to default values.
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task status. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.reset_settings()
Source code in meilisearch_python_sdk/index.py
6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 |
|
reset_sortable_attributes()
Reset sortable attributes of the index to default values.
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task status. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.reset_sortable_attributes()
Source code in meilisearch_python_sdk/index.py
7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 |
|
reset_stop_words()
Reset stop words of the index to default values.
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task status. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.reset_stop_words()
Source code in meilisearch_python_sdk/index.py
6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 |
|
reset_synonyms()
Reset synonyms of the index to default values.
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task status. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.reset_synonyms()
Source code in meilisearch_python_sdk/index.py
6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 |
|
reset_typo_tolerance()
Reset typo tolerance to default values.
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task status. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.reset_typo_tolerance()
Source code in meilisearch_python_sdk/index.py
7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 |
|
reset_word_dictionary()
Reset an index's word dictionary settings to the default value.
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task status. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_async_client import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.reset_word_dictionary()
Source code in meilisearch_python_sdk/index.py
7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 |
|
search(query=None, *, offset=0, limit=20, filter=None, facets=None, attributes_to_retrieve=None, attributes_to_crop=None, crop_length=200, attributes_to_highlight=None, sort=None, show_matches_position=False, highlight_pre_tag='<em>', highlight_post_tag='</em>', crop_marker='...', matching_strategy='last', hits_per_page=None, page=None, attributes_to_search_on=None, distinct=None, show_ranking_score=False, show_ranking_score_details=False, ranking_score_threshold=None, vector=None, hybrid=None, locales=None)
Search the index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
str | None
|
String containing the word(s) to search |
None
|
offset
|
int
|
Number of documents to skip. Defaults to 0. |
0
|
limit
|
int
|
Maximum number of documents returned. Defaults to 20. |
20
|
filter
|
Filter | None
|
Filter queries by an attribute value. Defaults to None. |
None
|
facets
|
list[str] | None
|
Facets for which to retrieve the matching count. Defaults to None. |
None
|
attributes_to_retrieve
|
list[str] | None
|
Attributes to display in the returned documents. Defaults to ["*"]. |
None
|
attributes_to_crop
|
list[str] | None
|
Attributes whose values have to be cropped. Defaults to None. |
None
|
crop_length
|
int
|
The maximun number of words to display. Defaults to 200. |
200
|
attributes_to_highlight
|
list[str] | None
|
Attributes whose values will contain highlighted matching terms. Defaults to None. |
None
|
sort
|
list[str] | None
|
Attributes by which to sort the results. Defaults to None. |
None
|
show_matches_position
|
bool
|
Defines whether an object that contains information about the matches should be returned or not. Defaults to False. |
False
|
highlight_pre_tag
|
str
|
The opening tag for highlighting text. Defaults to . |
'<em>'
|
highlight_post_tag
|
str
|
The closing tag for highlighting text. Defaults to |
'</em>'
|
crop_marker
|
str
|
Marker to display when the number of words excedes the |
'...'
|
matching_strategy
|
Literal['all', 'last', 'frequency']
|
Specifies the matching strategy Meilisearch should use. Defaults to
|
'last'
|
hits_per_page
|
int | None
|
Sets the number of results returned per page. |
None
|
page
|
int | None
|
Sets the specific results page to fetch. |
None
|
attributes_to_search_on
|
list[str] | None
|
List of field names. Allow search over a subset of searchable attributes without modifying the index settings. Defaults to None. |
None
|
distinct
|
str | None
|
If set the distinct value will return at most one result for the filterable attribute. Note that a filterable attributes must be set for this work. Defaults to None. |
None
|
show_ranking_score
|
bool
|
If set to True the ranking score will be returned with each document in the search. Defaults to False. |
False
|
show_ranking_score_details
|
bool
|
If set to True the ranking details will be returned with each document in the search. Defaults to False. Note: This parameter can only be used with Meilisearch >= v1.3.0, and is experimental in Meilisearch v1.3.0. In order to use this feature in Meilisearch v1.3.0 you first need to enable the feature by sending a PATCH request to /experimental-features with { "scoreDetails": true }. Because this feature is experimental it may be removed or updated causing breaking changes in this library without a major version bump so use with caution. This feature became stable in Meiliseach v1.7.0. |
False
|
ranking_score_threshold
|
float | None
|
If set, no document whose _rankingScore is under the rankingScoreThreshold is returned. The value must be between 0.0 and 1.0. Defaults to None. |
None
|
vector
|
list[float] | None
|
List of vectors for vector search. Defaults to None. Note: This parameter can only be used with Meilisearch >= v1.3.0, and is experimental in Meilisearch v1.3.0. In order to use this feature in Meilisearch v1.3.0 you first need to enable the feature by sending a PATCH request to /experimental-features with { "vectorStore": true }. Because this feature is experimental it may be removed or updated causing breaking changes in this library without a major version bump so use with caution. |
None
|
hybrid
|
Hybrid | None
|
Hybrid search information. Defaults to None. Note: This parameter can only be used with Meilisearch >= v1.6.0, and is experimental in Meilisearch v1.6.0. In order to use this feature in Meilisearch v1.6.0 you first need to enable the feature by sending a PATCH request to /experimental-features with { "vectorStore": true }. Because this feature is experimental it may be removed or updated causing breaking changes in this library without a major version bump so use with caution. |
None
|
locales
|
list[str] | None
|
Specifies the languages for the search. This parameter can only be used with Milisearch >= v1.10.0. Defaults to None letting the Meilisearch pick. |
None
|
Returns:
Type | Description |
---|---|
SearchResults
|
Results of the search |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> search_results = index.search("Tron")
Source code in meilisearch_python_sdk/index.py
4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 |
|
search_similar_documents(id, *, offset=None, limit=None, filter=None, embedder='default', attributes_to_retrieve=None, show_ranking_score=False, show_ranking_score_details=False, ranking_score_threshold=None)
Search the index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id
|
str
|
The id for the target document that is being used to find similar documents. |
required |
offset
|
int | None
|
Number of documents to skip. Defaults to 0. |
None
|
limit
|
int | None
|
Maximum number of documents returned. Defaults to 20. |
None
|
filter
|
str | None
|
Filter queries by an attribute value. Defaults to None. |
None
|
embedder
|
str
|
The vector DB to use for the search. |
'default'
|
attributes_to_retrieve
|
list[str] | None
|
Attributes to display in the returned documents. Defaults to ["*"]. |
None
|
show_ranking_score
|
bool
|
If set to True the ranking score will be returned with each document in the search. Defaults to False. |
False
|
show_ranking_score_details
|
bool
|
If set to True the ranking details will be returned with each document in the search. Defaults to False. |
False
|
ranking_score_threshold
|
float | None
|
If set, no document whose _rankingScore is under the rankingScoreThreshold is returned. The value must be between 0.0 and 1.0. Defaults to None. |
None
|
Returns:
Type | Description |
---|---|
SimilarSearchResults
|
Results of the search |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> search_results = index.search_similar_documents("123")
Source code in meilisearch_python_sdk/index.py
5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 |
|
update(primary_key)
Update the index primary key.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
primary_key
|
str
|
The primary key of the documents. |
required |
Returns:
Type | Description |
---|---|
Self
|
An instance of the AsyncIndex with the updated information. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> updated_index = index.update()
Source code in meilisearch_python_sdk/index.py
4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 |
|
update_displayed_attributes(body, *, compress=False)
Update displayed attributes of the index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
body
|
list[str]
|
List containing the displayed attributes. |
required |
compress
|
bool
|
If set to True the data will be sent in gzip format. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task status. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.update_displayed_attributes( >>> ["title", "description", "genre", "release_date"] >>> )
Source code in meilisearch_python_sdk/index.py
6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 |
|
update_distinct_attribute(body, *, compress=False)
Update distinct attribute of the index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
body
|
str
|
Distinct attribute. |
required |
compress
|
bool
|
If set to True the data will be sent in gzip format. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task status. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.update_distinct_attribute("url")
Source code in meilisearch_python_sdk/index.py
6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 |
|
update_documents(documents, primary_key=None, *, compress=False)
Update documents in the index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
documents
|
Sequence[JsonMapping]
|
List of documents. |
required |
primary_key
|
str | None
|
The primary key of the documents. This will be ignored if already set. Defaults to None. |
None
|
compress
|
bool
|
If set to True the data will be sent in gzip format. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> documents = [ >>> {"id": 1, "title": "Movie 1", "genre": "comedy"}, >>> {"id": 2, "title": "Movie 2", "genre": "drama"}, >>> ] >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.update_documents(documents)
Source code in meilisearch_python_sdk/index.py
5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 |
|
update_documents_from_directory(directory_path, *, primary_key=None, document_type='json', csv_delimiter=None, combine_documents=True, compress=False)
Load all json files from a directory and update the documents.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
directory_path
|
Path | str
|
Path to the directory that contains the json files. |
required |
primary_key
|
str | None
|
The primary key of the documents. This will be ignored if already set. Defaults to None. |
None
|
document_type
|
str
|
The type of document being added. Accepted types are json, csv, and ndjson. For csv files the first row of the document should be a header row contining the field names, and ever for should have a title. |
'json'
|
csv_delimiter
|
str | None
|
A single ASCII character to specify the delimiter for csv files. This can only be used if the file is a csv file. Defaults to comma. |
None
|
combine_documents
|
bool
|
If set to True this will combine the documents from all the files before indexing them. Defaults to True. |
True
|
compress
|
bool
|
If set to True the data will be sent in gzip format. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
list[TaskInfo]
|
The details of the task status. |
Raises:
Type | Description |
---|---|
InvalidDocumentError
|
If the docucment is not a valid format for Meilisearch. |
MeilisearchError
|
If the file path is not valid |
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from pathlib import Path >>> from meilisearch_python_sdk import Client >>> directory_path = Path("/path/to/directory/containing/files") >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.update_documents_from_directory(directory_path)
Source code in meilisearch_python_sdk/index.py
5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 |
|
update_documents_from_directory_in_batches(directory_path, *, batch_size=1000, primary_key=None, document_type='json', csv_delimiter=None, combine_documents=True, compress=False)
Load all json files from a directory and update the documents.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
directory_path
|
Path | str
|
Path to the directory that contains the json files. |
required |
batch_size
|
int
|
The number of documents that should be included in each batch. Defaults to 1000. |
1000
|
primary_key
|
str | None
|
The primary key of the documents. This will be ignored if already set. Defaults to None. |
None
|
document_type
|
str
|
The type of document being added. Accepted types are json, csv, and ndjson. For csv files the first row of the document should be a header row contining the field names, and ever for should have a title. |
'json'
|
csv_delimiter
|
str | None
|
A single ASCII character to specify the delimiter for csv files. This can only be used if the file is a csv file. Defaults to comma. |
None
|
combine_documents
|
bool
|
If set to True this will combine the documents from all the files before indexing them. Defaults to True. |
True
|
compress
|
bool
|
If set to True the data will be sent in gzip format. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
list[TaskInfo]
|
List of update ids to track the action. |
Raises:
Type | Description |
---|---|
InvalidDocumentError
|
If the docucment is not a valid format for Meilisearch. |
MeilisearchError
|
If the file path is not valid |
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from pathlib import Path >>> from meilisearch_python_sdk import Client >>> directory_path = Path("/path/to/directory/containing/files") >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.update_documents_from_directory_in_batches(directory_path)
Source code in meilisearch_python_sdk/index.py
6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 |
|
update_documents_from_file(file_path, primary_key=None, csv_delimiter=None, *, compress=False)
Add documents in the index from a json file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file_path
|
Path | str
|
Path to the json file. |
required |
primary_key
|
str | None
|
The primary key of the documents. This will be ignored if already set. Defaults to None. |
None
|
csv_delimiter
|
str | None
|
A single ASCII character to specify the delimiter for csv files. This can only be used if the file is a csv file. Defaults to comma. |
None
|
compress
|
bool
|
If set to True the data will be sent in gzip format. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task status. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from pathlib import Path >>> from meilisearch_python_sdk import Client >>> file_path = Path("/path/to/file.json") >>> client = Client("http://localhost.com", "masterKey") as client: >>> index = client.index("movies") >>> index.update_documents_from_file(file_path)
Source code in meilisearch_python_sdk/index.py
6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 |
|
update_documents_from_file_in_batches(file_path, *, batch_size=1000, primary_key=None, compress=False)
Updates documents form a json file in batches to reduce RAM usage with indexing.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file_path
|
Path | str
|
Path to the json file. |
required |
batch_size
|
int
|
The number of documents that should be included in each batch. Defaults to 1000. |
1000
|
primary_key
|
str | None
|
The primary key of the documents. This will be ignored if already set. Defaults to None. |
None
|
compress
|
bool
|
If set to True the data will be sent in gzip format. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
list[TaskInfo]
|
List of update ids to track the action. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from pathlib import Path >>> from meilisearch_python_sdk import Client >>> file_path = Path("/path/to/file.json") >>> client = Client("http://localhost.com", "masterKey") as client: >>> index = client.index("movies") >>> index.update_documents_from_file_in_batches(file_path)
Source code in meilisearch_python_sdk/index.py
6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 |
|
update_documents_from_raw_file(file_path, primary_key=None, csv_delimiter=None, *, compress=False)
Directly send csv or ndjson files to Meilisearch without pre-processing.
The can reduce RAM usage from Meilisearch during indexing, but does not include the option for batching.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file_path
|
Path | str
|
The path to the file to send to Meilisearch. Only csv and ndjson files are allowed. |
required |
primary_key
|
str | None
|
The primary key of the documents. This will be ignored if already set. Defaults to None. |
None
|
csv_delimiter
|
str | None
|
A single ASCII character to specify the delimiter for csv files. This can only be used if the file is a csv file. Defaults to comma. |
None
|
compress
|
bool
|
If set to True the data will be sent in gzip format. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task status. |
Raises:
Type | Description |
---|---|
ValueError
|
If the file is not a csv or ndjson file, or if a csv_delimiter is sent for a non-csv file. |
MeilisearchError
|
If the file path is not valid |
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from pathlib import Path >>> from meilisearch_python_sdk import Client >>> file_path = Path("/path/to/file.csv") >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.update_documents_from_raw_file(file_path)
Source code in meilisearch_python_sdk/index.py
6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 |
|
update_documents_in_batches(documents, *, batch_size=1000, primary_key=None, compress=False)
Update documents in batches to reduce RAM usage with indexing.
Each batch tries to fill the max_payload_size
Parameters:
Name | Type | Description | Default |
---|---|---|---|
documents
|
Sequence[JsonMapping]
|
List of documents. |
required |
batch_size
|
int
|
The number of documents that should be included in each batch. Defaults to 1000. |
1000
|
primary_key
|
str | None
|
The primary key of the documents. This will be ignored if already set. Defaults to None. |
None
|
compress
|
bool
|
If set to True the data will be sent in gzip format. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
list[TaskInfo]
|
List of update ids to track the action. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> documents = [ >>> {"id": 1, "title": "Movie 1", "genre": "comedy"}, >>> {"id": 2, "title": "Movie 2", "genre": "drama"}, >>> ] >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.update_documents_in_batches(documents)
Source code in meilisearch_python_sdk/index.py
5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 |
|
update_embedders(embedders, *, compress=False)
Update the embedders settings for an index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
embedders
|
Embedders
|
The embedders value. |
required |
compress
|
bool
|
If set to True the data will be sent in gzip format. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
TaskInfo
|
Task to track the action. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> from meilisearch_python_sdk.models.settings import Embedders, UserProvidedEmbedder >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.update_embedders( >>> Embedders(embedders={dimensions=512)}) >>> )
Source code in meilisearch_python_sdk/index.py
7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 |
|
update_faceting(faceting, *, compress=False)
Partially update the faceting settings for an index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
faceting
|
Faceting
|
Faceting values. |
required |
compress
|
bool
|
If set to True the data will be sent in gzip format. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
TaskInfo
|
Task to track the action. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.update_faceting(faceting=Faceting(max_values_per_facet=100))
Source code in meilisearch_python_sdk/index.py
7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 |
|
update_filterable_attributes(body, *, compress=False)
Update filterable attributes of the index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
body
|
list[str]
|
List containing the filterable attributes of the index. |
required |
compress
|
bool
|
If set to True the data will be sent in gzip format. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task status. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.update_filterable_attributes(["genre", "director"])
Source code in meilisearch_python_sdk/index.py
6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 |
|
update_localized_attributes(localized_attributes, *, compress=False)
Update the localized attributes settings for an index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
localized_attributes
|
list[LocalizedAttributes]
|
The localized attributes value. |
required |
compress
|
bool
|
If set to True the data will be sent in gzip format. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
TaskInfo
|
Task to track the action. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import AsyncClient >>> from meilisearch_python_sdk.models.settings import LocalizedAttributes >>> >>> >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.update_localized_attributes([ >>> LocalizedAttributes(locales=["eng", "spa"], attribute_patterns=[""]), >>> LocalizedAttributes(locales=["ita"], attribute_patterns=["_it"]), >>> ])
Source code in meilisearch_python_sdk/index.py
7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 |
|
update_non_separator_tokens(non_separator_tokens, *, compress=False)
Update the non-separator tokens settings for an index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
non_separator_tokens
|
list[str]
|
List of non-separator tokens. |
required |
compress
|
bool
|
If set to True the data will be sent in gzip format. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
TaskInfo
|
Task to track the action. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.update_non_separator_tokens(non_separator_tokens=["@", "#")
Source code in meilisearch_python_sdk/index.py
7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 |
|
update_pagination(settings, *, compress=False)
Partially update the pagination settings for an index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
settings
|
Pagination
|
settings for pagination. |
required |
compress
|
bool
|
If set to True the data will be sent in gzip format. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
TaskInfo
|
Task to track the action. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> from meilisearch_python_sdk.models.settings import Pagination >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.update_pagination(settings=Pagination(max_total_hits=123))
Source code in meilisearch_python_sdk/index.py
7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 |
|
update_proximity_precision(proximity_precision, *, compress=False)
Update the proximity precision settings for an index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
proximity_precision
|
ProximityPrecision
|
The proximity precision value. |
required |
compress
|
bool
|
If set to True the data will be sent in gzip format. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
TaskInfo
|
Task to track the action. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> from meilisearch_python_sdk.models.settings import ProximityPrecision >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.update_proximity_precision(ProximityPrecision.BY_ATTRIBUTE)
Source code in meilisearch_python_sdk/index.py
7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 |
|
update_ranking_rules(ranking_rules, *, compress=False)
Update ranking rules of the index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ranking_rules
|
list[str]
|
List containing the ranking rules. |
required |
compress
|
bool
|
If set to True the data will be sent in gzip format. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task status. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> ranking_rules=[ >>> "words", >>> "typo", >>> "proximity", >>> "attribute", >>> "sort", >>> "exactness", >>> "release_date:desc", >>> "rank:desc", >>> ], >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.update_ranking_rules(ranking_rules)
Source code in meilisearch_python_sdk/index.py
6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 |
|
update_search_cutoff_ms(search_cutoff_ms, *, compress=False)
Update the search cutoff for an index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
search_cutoff_ms
|
int
|
Integer value of the search cutoff time in ms. |
required |
compress
|
bool
|
If set to True the data will be sent in gzip format. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
TaskInfo
|
Task to track the action. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.update_search_cutoff_ms(100)
Source code in meilisearch_python_sdk/index.py
7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 |
|
update_searchable_attributes(body, *, compress=False)
Update searchable attributes of the index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
body
|
list[str]
|
List containing the searchable attributes. |
required |
compress
|
bool
|
If set to True the data will be sent in gzip format. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task status. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.update_searchable_attributes(["title", "description", "genre"])
Source code in meilisearch_python_sdk/index.py
6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 |
|
update_separator_tokens(separator_tokens, *, compress=False)
Update the separator tokens settings for an index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
separator_tokens
|
list[str]
|
List of separator tokens. |
required |
compress
|
bool
|
If set to True the data will be sent in gzip format. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
TaskInfo
|
Task to track the action. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.update_separator_tokens(separator_tokenes=["|", "/")
Source code in meilisearch_python_sdk/index.py
7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 |
|
update_settings(body, *, compress=False)
Update settings of the index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
body
|
MeilisearchSettings
|
Settings of the index. |
required |
compress
|
bool
|
If set to True the data will be sent in gzip format. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task status. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> from meilisearch_python_sdk import MeilisearchSettings >>> new_settings = MeilisearchSettings( >>> synonyms={"wolverine": ["xmen", "logan"], "logan": ["wolverine"]}, >>> stop_words=["the", "a", "an"], >>> ranking_rules=[ >>> "words", >>> "typo", >>> "proximity", >>> "attribute", >>> "sort", >>> "exactness", >>> "release_date:desc", >>> "rank:desc", >>> ], >>> filterable_attributes=["genre", "director"], >>> distinct_attribute="url", >>> searchable_attributes=["title", "description", "genre"], >>> displayed_attributes=["title", "description", "genre", "release_date"], >>> sortable_attributes=["title", "release_date"], >>> ) >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.update_settings(new_settings)
Source code in meilisearch_python_sdk/index.py
6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 |
|
update_sortable_attributes(sortable_attributes, *, compress=False)
Get sortable attributes of the AsyncIndex.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sortable_attributes
|
list[str]
|
List of attributes for searching. |
required |
compress
|
bool
|
If set to True the data will be sent in gzip format. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task status. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.update_sortable_attributes(["title", "release_date"])
Source code in meilisearch_python_sdk/index.py
7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 |
|
update_stop_words(body, *, compress=False)
Update stop words of the index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
body
|
list[str]
|
List containing the stop words of the index. |
required |
compress
|
bool
|
If set to True the data will be sent in gzip format. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task status. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.update_stop_words(["the", "a", "an"])
Source code in meilisearch_python_sdk/index.py
6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 |
|
update_synonyms(body, *, compress=False)
Update synonyms of the index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
body
|
dict[str, list[str]]
|
The synonyms of the index. |
required |
Returns:
Type | Description |
---|---|
TaskInfo
|
The details of the task status. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") as client: >>> index = client.index("movies") >>> index.update_synonyms( >>> {"wolverine": ["xmen", "logan"], "logan": ["wolverine"]} >>> )
Source code in meilisearch_python_sdk/index.py
6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 |
|
update_typo_tolerance(typo_tolerance, *, compress=False)
Update typo tolerance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
typo_tolerance
|
TypoTolerance
|
Typo tolerance settings. |
required |
compress
|
bool
|
If set to True the data will be sent in gzip format. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
TaskInfo
|
Task to track the action. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> TypoTolerance(enabled=False) >>> index.update_typo_tolerance()
Source code in meilisearch_python_sdk/index.py
7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 |
|
update_word_dictionary(dictionary, *, compress=False)
Update the word dictionary settings for an index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dictionary
|
list[str]
|
List of dictionary values. |
required |
compress
|
bool
|
If set to True the data will be sent in gzip format. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
TaskInfo
|
Task to track the action. |
Raises:
Type | Description |
---|---|
MeilisearchCommunicationError
|
If there was an error communicating with the server. |
MeilisearchApiError
|
If the Meilisearch API returned an error. |
Examples >>> from meilisearch_python_sdk import Client >>> client = Client("http://localhost.com", "masterKey") >>> index = client.index("movies") >>> index.update_word_dictionary(dictionary=["S.O.S", "S.O")
Source code in meilisearch_python_sdk/index.py
7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 |
|