Tokenisation of expanded ninja tables shortcode terms
-
Hi,
I’ve installed Relevanssi plugin on the site I’m working on and it has improved the search dramatically. Thanks!
My client uses NinjaTables Pro to manage product spec data. They insert a shortcode into the product description which is then expanded to the full table on display on the site front-end. Initially this table wasn’t being indexed at all. I found a forum post with a similar issue which lead me to add the following filter to the site:
add_filter( ‘relevanssi_custom_field_value’, ‘relevanssi_index_ninja_tables’ );
At the same time I activated Relevanssi debug and saw that the table shortcode is indeed now being expanded during indexing. The problem occurs in that when the table terms are tokenised most of them are ignored. The relevant part of the debug is as follows (I’ve removed the majority of the content for brevity):
Post content after relevanssi_post_content:
The below table gives an overview of the specifications for the Isabellenhütte A-H1 series: [ninja_tables id="57757"] Resistance Values 1 to 500<br />1 to 100 mOhm<br />Ohm Tolerance 0.1<br />1 % Temperature Coefficient (20-60°C) <30 ppm/K Applicable Temperature Range -55 to +140 °C Power Rating 3<br />10 (on a heatsink) W Thermal Resistance to Ambient (Rth) <15 K/W Thermal Resistance to Aluminium Substrate (Rthi) <3 K/W Dielectric Withstanding Voltage 500 V AC/DC Inductance <10 nH Stability (Nominal Load) Deviation After 2000h <0.1 (T? = 80°C with heatsink)<br /><0.2 (T? = 95°C with heatsink)<br />T? = Terminal Temperature %
The table content appears after the [ninja_tables id=”57757″] shortcode and to the end of the snippet.
Content, tokenized:
hole resistor series isabellenhütte offers terminal connection technology current sensing applications designed easy heat sink mounting kelvin connections allow high precision measurements low resistance values range 0001ω 100ω available inductance pulse power handling capabilities select rating 10w suitable free air maximum permanent 81a constant applicable temperature 55°c 140°c tolerance options ±01 depending required tcr ppm 20°c 60°c self heating typical include measurement equipment reference resistors laboratories sources laboratory supplies table gives overview specifications 500 100 mohm ohm coefficient
The only table terms that have been tokenised for indexing are: 500, 100, mohm, ohm, coefficient. This is much less than the amount of content in the table. This table contains a high number of technical words so wouldn’t be covered by the stop list. The last content term in the token list ‘coefficient’ appears on row 3 of 10 in the table.
I hope I have understood the indexing process correctly. I have a few questions:
How are the terms chosen for tokenisation?
Is there any way I can increase the number of terms that are tokenised from the expanded shortcode?
Additionally is it possible to force select uppercase characters on tokenisation? E.g. the ‘ω’ characters should either be indexed as ‘Ω’ or ‘ohms’ (apologies for sneaking in this complete other issue into the end of the main problem!)Many thanks for any help you can provide with this issue. Please let me know if I can get any further debug to find out what’s going on?
Antony
The page I need help with: [log in to see the link]
- The topic ‘Tokenisation of expanded ninja tables shortcode terms’ is closed to new replies.