Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Synonym import file format – error
- This topic has 9 replies, 2 voices, and was last updated 5 years, 5 months ago by
Ernest Marcinko.
-
AuthorPosts
-
December 10, 2020 at 11:37 am #30616
robertmattar87
ParticipantHi guys I am trying to upload the attached synonym file.
Can you confirm if the format is correct as I’m getting an error message.
Cheers,
Robert
December 10, 2020 at 1:22 pm #30619Ernest Marcinko
KeymasterHi,
There is a comma after the last array element in the json file. If you remove that, it should work. If wordpress does not allow uploading the file, try renaming it to asp_synonyms_export.json
December 10, 2020 at 1:32 pm #30621robertmattar87
ParticipantYou cannot access this content.
December 10, 2020 at 1:34 pm #30622Ernest Marcinko
KeymasterYes, that would work. You can also try renaming it to asp_synonyms_export.json before upload, it might be allowed then.
December 14, 2020 at 8:06 am #30669robertmattar87
ParticipantHi guys,
So I was able to import the file (when renamed to a json file). I reindexed the search however it is not working with any of the imported synonyms. If I manually create it it works fine (but we have over 1000!).
Any help would be great.
Thanks,
Robert
December 14, 2020 at 10:10 am #30671Ernest Marcinko
KeymasterDid the size of the index increase after reindexing?
December 14, 2020 at 10:13 am #30672robertmattar87
ParticipantYes it did which was odd. Just to check it I deleted one of the imported synonyms and recreated it manually and reindexed and it started working.
December 14, 2020 at 10:26 am #30673Ernest Marcinko
KeymasterI think it might be the upper case then, I’m 99% sure. I checked the code, and the import does not force lower case before pushing to the database (because the export is forced as lowercase by default), but the keywords should be lowercase. Can you lowercase the file easily? You can use this tool.
I will add an check to force lower case on all import in the next release.December 14, 2020 at 11:01 am #30675robertmattar87
ParticipantHey Ernest, i’m still seeing sporadic issues even after that.
It’s usually when there is a scenario like this:
Post Title: p416b
Add keyword p416b with synonym pj416b. This fails
The reverse scenario seems to work fine.
Post title: pj416b
Add keyword pj416b with synonym p416b. This seems to work.
December 14, 2020 at 1:17 pm #30678Ernest Marcinko
KeymasterFor that, you need to enable this option: https://i.imgur.com/aFrcxmC.png
In that case, the synonyms work in both ways, as one set, so all definitions work backwards as well.When that option is enabled, you can reduce the sets, like so: https://i.imgur.com/q0PF5Aq.png
Then, if you define a rule for example:cf4 => cfc4, cfj4, it means, the plugin will generate the following final rules (all keyword to keyword matches):cf4 => cfc4, cfj4 cfc4 => cf4 , cfj4 cfj4 => cfc4, cf4This can help greatly reduce the rules count, if you need all keywords in a group to work in every direction anyways.
-
AuthorPosts
- You must be logged in to reply to this topic.