The OneDealer Enterprise Search is a powerful feature of OneDealer for searching information. Behind the scenes we use Lucene search engine by creating catalogues that are being produced from data indexing in our databases.
The search is being made inside of the OneDealer, but the catalogue generation is executed by an external console application. This application can be executed by a task scheduler or manually. Another scenario of data indexing is by triggering the Lucene indexing through OneDealer.
OneDealer Lucene application
The heart of application is the LuceneConfig.xml file where we define
- the database schema that we want to index
- the business entities that we want to index
<?xml version="1.0" encoding="utf-8" ?> <OneDealerSetupLuceneIndexer> <!-- Root folder of the Lucene app --> <RootFolder>X:\XXXXXX\XXXX\XXXX</RootFolder> <!-- Execution folder of Lucene app --> <LuceneExecutionRootFolder>X:\XXXXXX\XXXX\XXXX\XXXXX</LuceneExecutionRootFolder> <InstallationIndexers> <LuceneInstallationIndexer> <!-- List of schema names to be indexed --> <SchemaNames> <LuceneSchema> <SchemaName>RCGENDEV</SchemaName> <!-- If it has B1 Service Layer define the time difference --> <ServiceLayerTimeDifference>0</ServiceLayerTimeDifference> </LuceneSchema> </SchemaNames> <!-- List of Business Entities to be indexed --> <LuceneBusinessEntities> <!-- Business Entity to be indexed --> <LuceneBusinessEntity> </LuceneBusinessEntity> </LuceneBusinessEntities> </LuceneInstallationIndexer> <!-- Lucene Indexer Dimensions --> <Dimensions> <LuceneDimension> <Name>UserId</Name> </LuceneDimension> <LuceneDimension> <Name>SalesPersonCode</Name> </LuceneDimension> <LuceneDimension> <Name>U_IDMS_DIM_Company</Name> </LuceneDimension> </Dimensions> </InstallationIndexers> </OneDealerSetupLuceneIndexer>
LuceneBusinessEntity
LuceneBusinessEntity
is a class name that contains valuable information regarding the data indexing and the data that are going to be displayed inside OneDealer. Let's see the definition of LuceneBusinessEntity
class:
Property | Description | Is Required |
---|---|---|
EntityName | The name of the Entity to be indexed | |
AssemblyIocProvider | A fully assembly qualified name of a custom provider | |
EntityFriendlyName | The name of the entity to be displayed in OneDealer | |
PropertyNameId | The property name of the entity that represents the Primary key / id | |
EntityTitleProperty | The property name of the entity that represents Title, Description or name | |
UrlEntity | The url that will be linked in the result | |
UrlEntityKey | The entity key name to navigate through the link | |
UrlQueryStringNameKey | The parameter name that is expected for the key name | |
MasterEntity | if the Entity name is a view, we declare here the actual entity that represents | |
CreateDateField | The property name of the entity that contains the Creation date | |
CreateTimeField | The property name of the entity that contains the Creation time | |
UpdateDateField | The property name of the entity that contains the Update date | |
UpdateTimeField | The property name of the entity that contains the Update time | |
IsServiceLayer | if the property is SL object | |
CssClass | a css class name for icon | |
DataProviderFilters | List of Filters | |
BusinessEntityFields | List of properties to be displayed in OneDealer | |
EntityDimensions | List of the dimension properties of the entity |
AssemblyIocProvider
Here we can declare a custom implementation of ILuceneBusinessEntityDataProvider
interface for indexing data.
An example is the data indexing of external sources, such as Incadea.
We created the OneDealerLuceneIncadeaExternalDataProvider
class, which inherits from OneDealerLuceneExternalDataProvider<T>
that executes HTTP requests through the declared IInterfacingManager
.
The IInterfacingManager
implementation has a configuration of the base address URL and the URI that is going to be called.
DataProviderFilters
List of static filters to execute the query to the database
LuceneDataProviderFilter | Description | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
ValueType | The expected value type | c# System Type (sting, int, etc) | ||||||||||
Field | the property name to filter | |||||||||||
Value | the value to filter | |||||||||||
FilterOperator | the operator |
|
BusinessEntityFields
Type | Description | Is Required | |
---|---|---|---|
StringField | The type of the field to be displayed | ||
PropertyName | The property name of the entity to be binded | ||
FieldName | The name of the field to be displayed | ||
NumberField | |||
PropertyName | The property name of the entity to be binded | ||
FieldName | The name of the field to be displayed | ||
NumberFormat |
EntityDimensions
LuceneEntityDimension | Description | |
---|---|---|
DimensionName | The dimension property name of the Lucene Indexer | |
PropertyName | The property name of the entity for the dimension |
Add Comment