How should a DESCRIBE on a percolate index show?

Starting to ramp up using Percolate queries for the first time, and noticed an inconsistency.

You define all the fields (and attributes) in the percolate index in the .conf file,

But then when run a ‘DESCRIBE’ on the index just get the ‘id’, ‘query’, ‘tags’, ‘filters’ columns, in many ways this makes sense, as that is surely what the PQ index must contain. It a list of queries.

sphinxQL>describe pq1;
+---------+--------+------------+
| Field   | Type   | Properties |
+---------+--------+------------+
| id      | bigint |            |
| query   | string |            |
| tags    | string |            |
| filters | string |            |
+---------+--------+------------+
4 rows in set (0.00 sec)

The same columns get from CALL PQ (if 1 as query anyway!)

But
https://docs.manticoresearch.com/latest/html/searching/percolate_query.html#reconfigure
seems to say the a DESCRIBE would show all the fields/attributes defined in the config file, and saying would see them after issuing a ‘RECONFIGURE’ command.

This doesn’t seem to be the case. I assume its the documentation is wrong.

And as such there isn’t a ‘runtime’ command to see what the fields defined in the percolate index
Do seem to get an error if use unknown fields,

>insert into pq1 (query) values ('@newfield testing');
ERROR 1064 (42000): query error: no field 'newfield' found in schema

But seems like config file would be the only way to know, but then you don’t know if RECONFIGURE was called.

manticore-3.4.2

as said in our docs

If you’re looking for an expected document schema use DESC <pq index name> table

Thanks!

Yes, had missed the DESC <pq index name> TABLE syntax.

I’ve submitted a Pull-Request to fix the docs :slight_smile:

i think the right examples are already in the docs as describe show general schema for index and for all pq index the schema is the same but desc table shows internal schema that could vary for different pq indexes.

And we also will release new documentation with new structure and this will be achieved not sure it is worth to change current documentation

Where is the DESCRIBE pq TABLE syntax documented in new docs?

https://manual.manticoresearch.com/Listing_indexes#DESCRIBE
… documents plain DESCRIBE, not the ‘extension’ to get the PQ structure.

And
https://manual.manticoresearch.com/Searching/Percolate_query
makes no mention of DESCRIBE pq TABLE or even using ALTER TABLE on a PQ index.

here it is
If you’re looking for an expected document schema use DESC table:

Ah ok thanks! Not sure how to find it tho :frowning:
Had tried searches like ‘Percolate schema’ and ‘Percolate desc’ / ‘Percolate describe’

Even just ‘describe pq table’ just finds a reference in changelog ( Asuming I now what it called). Not the actual syntax.

Oh, just found it now in the results for ‘percolate index’ :slight_smile:

And turns out it is in the general DESCRIBE section
https://manual.manticoresearch.com/Listing_indexes#DESCRIBE
just that it listed UNDER heading about SHOW CREATE, so looks like it already moved on from ‘DESCRIBE’ - so wouldnt think to continue scrolling, once the subject changed to something else.

you could edit docs at manual folder at Github and create PR with better structure or add link to table syntax.

We rejected your last PR only because new documentation was on the way and do not want to merge changes from old docs.

Now changes to new docs are welcome.

desc table search shows right reference as all examples use desc syntax and describe got mentioned only at statement syntax

Looks like we need to add an exception/wordform for this.

not sure what it should look like as desc used alot at ORDER BY x DESC examples and it could break with desc <> describe replacement

To handle this, I’ve added wordforms:
desc pq > descpq
describe pq > descpq