Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to set multiple wordforms #39

Open
githubmanticore opened this issue May 5, 2020 · 2 comments
Open

failed to set multiple wordforms #39

githubmanticore opened this issue May 5, 2020 · 2 comments
Assignees

Comments

@githubmanticore
Copy link

githubmanticore commented May 5, 2020

not quite sure how to set multiple wordform files for index

$params = [  
    'body' => [  
        'settings' => [  
             'wordforms' => '/usr/local/sphinx/data/wordforms.txt'  
        ],  
        'columns' => [  
            'title'=>['type'=>'text'],  
            'price'=>['type'=>'float']  
        ]  
    ],  
    'index' => 'products'  
];  
$index = new \Manticoresearch\Index($client);  
$index->create($params);  

however index with such config works well

index products {  
  wordforms = /usr/local/sphinx/data/wordforms.txt  
  wordforms = /usr/local/sphinx/data/alternateforms.txt  
    
  type = rt  
  path = idx  
  rt_field = title  
  rt_attr_uint = price  
}  
@adriannuta
Copy link
Collaborator

Need to see first how this will be handled by Manticore.

@adriannuta adriannuta self-assigned this May 5, 2020
@d47081
Copy link

d47081 commented Nov 25, 2023

Maybe this one?

https://github.com/manticoresoftware/manticoresearch-php/blob/master/docs/indexclass.md#create

If a setting can have multiple values, an array of values will be used, like:

 $index->setName('mynewindex');
 $index->create([],
    [
        'type' => 'distributed',
        'local' => [
            'local_index_1',
            'local_index_2',
        ]
    ]
 );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants