# Index Configuration Home

Indexes describe any category by which items in your 1search implementation can be filtered and/or sorted. All 1search indexes are configured using XML format.

1search contains the following types of indexes:

  • Aspects are used to define a way in which items can be categorised within a finite collection of facets/values.
  • Functions: 1search contains a set of four predefined functions which can be configured to group or count indexes in a variety of ways.
  • GroupBys allow you to group multiple indexes into a single, GroupBy index.
  • Ranges allow you to configure an index with a numerical value. The user is then able to filter search results to see items that lie within a boundary of the range index.
    • Histograms can be configured within a range index to return the number of items that fall within specified boundary values of the range.
  • Keywords are used to define rules for how keywords queried by the user to your search engine are processed and compared to other facets or values in your database.
    • String Comparers can be specified to establish rules for how keyword strings entered by the user are compared to string values in your search engine.
    • Keyword Configuration: To configure Keywords to look for when users use the
  • GeoLocations are used to specify GPS coordinates so that items can be categorised by location.
  • SortIndexes allow the user to sort results by an existing index.
    • RandomSort is a type of sort which randomly sorts the user's search results.

# Configuration Full Example

<?xml version="1.0" encoding="utf-8" ?>
<DataConfiguration Version="1">
    <Keywords>
        <Keyword Name="BooksAll" Key="Aspects.Keywords.BooksAll" ValueComparer="OrdinalIgnoreCase">
            <SupportingIndexes>
                <Include>
                    <Index Type="Aspect" Name="Genre"/>
                    <Index Type="Aspect" Name="Series"/>
                    <Index Type="Aspect" Name="Microwaveable"/>
                    <Index Type="Range" Name="Price"/>
                </Include>
            </SupportingIndexes>
        </Keyword>
    </Keywords>
    <SortIndexes>
        <SortIndex Name="Price">
            <Index Key="Price" Direction="Descending"/>
        </SortIndex>
    </SortIndexes>
    <Aspects FacetComparer="OrdinalIgnoreCase">
        <Aspect Name="Genre" Key="Genre" MultiSelectMode="Or">
            <Child>Series</Child>
        </Aspect>
        <Aspect Name="Series" Key="Series" ChildOnly="true" MultiSelectMode="Or"/>
        <Aspect Name="Microwaveable" Key="Microwaveable"/>
        <Aspect Name="NetworkId" Key="Id" />
    </Aspects>
    <Ranges>
        <Range Name="Price" DataType="System.Double" Key="Price"/>
    </Ranges>
    <GeoLocations>
        <GeoLocation Name="Location" Func="GeoLocationTuple">
            <SortIndex Name="BookshopLocations"/>
            <Poi Name="Postcode"/>
        </GeoLocation>
    </GeoLocations>
    <GroupBys>
        <GroupBy Name="GenreMicrowavable" Func="GenreMicrowavableTuple"/>
    </GroupBys>
    <Functions>
        <Tuple Name="GeoLocationTuple">
            <Value Name="Latitude" Key="GeoLocation.Latitude"/>
            <Value Name="Longitude" Key="GeoLocation.Longitude"/>
        </Tuple>
        <Tuple Name="GenreMicrowavableTuple">
            <Value Name="Genre" Key="Genre"/>
            <Value Name="Microwaveable" Key="Microwaveable"/>
        </Tuple>
    </Functions>
    <RandomSort Name="random"/>
</DataConfiguration>