# Config

Article Search needs to be configured with Content-Agent, ICP and Writer providers and endpoints.

* go to Plugins > Article Search  > settings > Configurations
* add your own config inside the configEditor field.

Article Search also needs to be configured with requirements in Mappings section

* go to Plugins > Article Search > settings > Mappings
* select all the required actions by selecting from the dropdown for each required action.

## Advanced feature

> **example**

In your config object you can add your `Slug` OC-Property in `propertiesToFetch` and map it in `propertyMappings` as a `slugline`

```javascript
{
    ...
    "propertiesToFetch": [
        "...",
        "Slug",
        "..."
    ],
    "propertyMappings": [
        {...},
        {
            "startpageField": "slugline",
            "ocProperty": "Slug"
        },
        {...}
    ]
    ...
}
```

> **results**

![article-search-slugline](https://camo.githubusercontent.com/0488c7f92ee154fb341190887de3e7cc5593e443/68747470733a2f2f73332d65752d776573742d312e616d617a6f6e6177732e636f6d2f64617368626f6172642d67726170686963732f61727469636c652d7365617263682d736c75676c696e2e706e67)

### Fetch article avatars

```javascript
{
   ...
   "propertiesToFetch": {
        ...
        "ConceptRelations.ConceptAvatarRelation.uuid"
        ...
    },
    "propertiesFilter": {
        {
            "property" : "ConceptRelations",
            "q" : "ConceptImType:channel"
        }
    }
  ...
}
```

### Sort order for SuggestSearch

In the configuration there is possibility to add a 'weight' on a suggest-property. The list is sorted descending, high -> low

```javascript
{
   ...
   "suggestOrder": {
      "Products": 10,
      "Channels": 5,
      "Subjects": 3
    },
  ...
}
```

### specify with autoSearch to start searching when the plugin has been loaded

```javascript
{
    ...
   "autoSearch": true
    ...
}
```

### Specify which OC property to use for sorting.

```javascript
{
    ...
    "sorting": {
        "field": "YOUR_SORT_PROPERTY_FIELD", // or remove sorting object to get the default 'updated'
        "ascending": false
    },
    ...
}
```

### Specify results per page

```javascript
{
  ...
  "resultsPerPage": 10,
  ...
}
```

### Specify default query that is set when no active suggestions are present

```javascript
{
  ...
  "defaultQuery": "*:*",
  ...
}
```

### Specify filter query that is added onto the suggestions query and final search query

```javascript
{
  ...
  "filterQuery": "contenttype:Article",
  ...
}
```

### Specify published property in order to add published as an option in date search

```javascript
{
    ...
    "propertyMappings": [
        {
          "startpageField": "published",
          "ocProperty": "PubStart"
        },
    ...
}
```

## OC Configuration

Article Search plugin requires that some properties are configured in OpenContent.

*Note: There should also be a property with an `updated` value. We are currently using the default OC property called updated*

#### Properties

```yaml
- name: Authors
  type: TEXT
  multivalued: true
  sortable: false
  readonly: false
  suggest: true

- name: Headline
  type: TEXT
  multivalued: false
  sortable: false
  readonly: false
  suggest: false

- name: ImageFilenames
  type: STRING
  multivalued: true
  sortable: false
  readonly: false
  suggest: false
  description: Added to support app config.

- name: ImageUuids
  type: STRING
  multivalued: true
  sortable: false
  readonly: false
  suggest: false

- name: NewsPrio
  type: INTEGER
  multivalued: false
  sortable: true
  readonly: false
  suggest: false

- name: NewsPrioLifetime
  type: STRING
  multivalued: false
  sortable: false
  readonly: false
  suggest: false

- name: PubStart
  type: DATE
  multivalued: false
  sortable: true
  readonly: false
  suggest: false
  description: Added to support app config.

  - name: PubStatus
  type: STRING
  multivalued: false
  sortable: false
  readonly: false
  suggest: true
  description: Added to support app config.

- name: Services
  type: STRING
  multivalued: true
  sortable: false
  readonly: false
  suggest: true
  description: The NewsML "service" element to define for example siteContext or Product

- name: Text
  type: TEXT
  multivalued: true
  sortable: false
  readonly: false
  suggest: false
```

#### Sorting

Currently the Article Search uses the updated field to make sorting, so this MUST be present

```yaml
sorting:
    - name: Updated
      indexfields:
          - name: updated
            ascending: false

    - name: Updated
      contenttype: Article
```

### Examples in images

![](/files/-M8o5wUhG27KpKfBCkjF)

![](/files/-M8o6HZ-WVZHF8oCe-8Y)

![](/files/-M8o6KAKNIJGGQT0MkpH)

![](/files/-M8o6NcNxURNGN_v08w4)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.navigaglobal.com/article-search/3.0.0/admin/config.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
