# iNav Request
# Description
iNav is a way of navigating through all the possible searches in your dataset in order to narrow it down. This can be done via adding the iNav keyword in your URL request like this:
search?inav&q=Genre.Fantasy.
This search will generate what is called an iNav, which is a list of nodes each with its own facets that can be used to further drill into the search. Each entry in the facets section contains an Action value, this is what you ca paste into the request in order to search further.
Say you make a request for Genre.Fantasy., 1search will then generate an iNav to
display what you can request next from that, it will
display possible child item searches such as Series items as well
as other aspects that can be combined with an Or modifier instead of And. If you then find the Author,
it will show all the authors that can be combined with that initial request,
for example, the option of Or.Genre.Fantasy._.Author.Kohei Horikoshi.. That
snip-it can be found in the Action section of the list item and can be used
to create a response that matches what you wish to search for.
Using the iNav keyword in your request will produce an iNav instead of displaying all items for sale.
# Benefits of an iNav Request
An iNav is the way that 1search implements guided navigation into the websites implementing them. Because iNav will constantly give you options to further filter your results and refine your searches using iNav makes it very easy to create clickable sidebars and filtering for your website.
# Syntax
?iNav=<Navigation Name>(displayNameKey:<Key>,hideUnselectedFacets:<HideUnseletedFacets>)|<Post Processor>&<Optional Request>
# Attributes
- iNav
- The iNav keyword to use in order to produce an iNav result.
- Navigation Name
- The Navigation Name you gave under the Navigations Tag defined within your Navigations within that config multiple Navigations can be configured, but you can only select one when performing an iNav request. It will determine how your iNav is generated based on the aspects, ranges, POI ect you have defined within the configuration.
- Display Name Key
- Display Name Key simply refers to a two letter code that will determine which of the display names configured in Display Names will be shown in the iNav. If no Display Name Key is specified then it will use the default names of items.
- HideUnselectedFacets
- This option is set to false by default, and will show all facets that have not yet been put into the other request. If culture is not specified first, you must use the hideUnselectedFacets:true in order to use this.
- HideNonSeoUnselectedFacets
- This option is set to false by default.
Unselected facets without SEO links will be hidden when this option is enabled.
Use
HideNonSeoUnselectedFacets:trueand specify one SEO post processor to enable it.
- This option is set to false by default.
Unselected facets without SEO links will be hidden when this option is enabled.
Use
- Post Processor
- Post Processor can be SEO. using SEO will generate SEO-friendly URL's that will display below facet items.
- Optional Request
- An optional request you may add after the iNav keyword to refine your search, without a request an iNav of the primary aspect elements will be created.
# Example One
# Code
?inav
The following is a part of the result produced by the above code.
{
"iNav":{
"Nodes":[
{
"IsSelected":false,
"PlaceholderExpression":"(<!>)",
"MultiSelectMode":"Or",
"RemoveAction":"",
"Facets":[
{
"IsSelected":false,
"Value":"J.K. Rowling",
"Action":"Author.J\.K\. Rowling.",
"Count":29,
"Expression":"Author.J\.K\. Rowling.",
},
{
"IsSelected":false,
"Value":"Barak Obama",
"Action":"Author.Barak Obama.",
"Count":1,
"Expression":"Author.Barak Obama.",
},
In the above result, the action section in the facet list contains the next available move to make to traverse deeper into the search results, this can then be copied and pasted into the request in order to get the next available steps.
# Example Two
# Code
?inav&q=Author.Barak Obama.
The following is a part of the result produced by the above code.
{
"iNav":{
"Nodes":[
{
"IsSelected":true,
"PlaceholderExpression":"(<!>)",
"MultiSelectMode":"Or",
"RemoveAction":"",
"Facets":[
{
"IsSelected":true,
"Value":"Barak Obama",
"Action":"",
"Count":1,
"Expression":"Author.Barak Obama.",
},
{
"IsSelected":false,
"Value":"Diane Wynne Jones",
"Action":"(Or.Author.Barak Obama._.Author.Diane Wynne Jones.)",
"Count":2,
"Expression":"Author.Diane Wynne Jones.",
},
{
"IsSelected":false,
"Value":"George R.R. Martin",
"Action":"(Or.Author.Barak Obama._.Author.George R\.R\. Martin.)",
"Count":4,
"Expression":"Author.George R\.R\. Martin.",
}
In this example, the first action result from the above request is used and as is visible in the actions tab they are further refined forms of the one used in this request and usually combine more facets or aspects onto the next request.
# Example Three
# Code
?inav=booksbooks(en,false)|seo(books)
The following is a part of the output given by the above request
"iNav":{
"Nodes":[
{
"IsSelected":false,
"PlaceholderExpression":"(<!>)",
"MultiSelectMode":"Or",
"RemoveAction":"",
"Facets":[
{
"IsSelected":false,
"Value":"Dark Fantasy",
"Action":"Genre.Dark Fantasy.",
"Count":1,
"Expression":"Genre.Dark Fantasy.",
"SeoUrl":"/dark-fantasy-genre/",
},
In this example, the language is set to en, and the hidden facets will
be shown, the hidden facets being shown are those that are not contained within
the request itself, e.g. the iNav filters. This is shown by the IsSelected
item, those that have false will not be shown if the hideUnselectedFacets
is set to true. The second parameter for the iNav request is occupied by
the SEO field and uses the SEO translator configured in SEO.
This will tell the iNav to display the SEO-friendly URL as well as the rest of the
data.
