cli.search_arguments
A jadpo search command names no action or one it doesn't have, or an entity the project doesn't declare or doesn't search in an engine.
Area 14, Tools; not declinable; the next step is usually the agent's.
Why Jadpo refuses it
jadpo search reindex <Entity> rebuilds one entity's index in the
search engine its search: names, from the entity's records. It never
guesses which action or entity was meant, and an entity searched on
PostgreSQL has no index to rebuild: its words are kept in each record's
own row, and PostgreSQL keeps them up to date with every write.
What it looks like
A shop whose products are searched by name, on PostgreSQL:
domains/shop/entities/product.jadpo:
use shop/types { ProductName }/// Something the shop sells, found by its name.entity Product { id: Uuid name: ProductName policy: { read: [Access.public] } search: { fields: [name] language: SearchLanguage.english }}
An action misspelt is refused with the one nearest:
jadpo search reindx Product error reindx isn't something jadpo search does
- reason
jadpo search reindexrebuilds an entity's index in its engine. Did you meanreindex?- next
- Use
reindexinstead ofreindx(agent) - rule
- cli.
search_ arguments - help
- https://jadpo.
dev/docs/errors/cli. search_ arguments
(agent) at the end of the next: line means your coding agent can make
the fix itself.
An entity searched on PostgreSQL has nothing to rebuild:
jadpo search reindex Product error Product isn't searched in an engine
- reason
Productis searched on PostgreSQL, whose words are kept in each record's own row, so there is no index to rebuild.- next
- Leave out the reindex: PostgreSQL keeps
Product's words up to date as each record changes (agent) - rule
- cli.
search_ arguments - help
- https://jadpo.
dev/docs/errors/cli. search_ arguments
How to fix it
If the action or the entity is misspelt, use the one the command names:
jadpo search reindex ProductIt rebuilds the index of Product, when its search: names an engine.
If the entity is searched on PostgreSQL, leave the reindex out. Every search reads the words its records hold now, as its tests show:
jadpo testEach search answers from the records as they are. Only an entity whose
search: has a store: naming an engine's connection keeps its words
in an index of its own, which jadpo search reindex rebuilds.
Related
Markdown for agents: /docs/errors/cli.search_arguments.md.Built from Jadpo's main branch at commit f05ed31.