searchsrv_plat/cpix_utility_api/inc/cpixmaindefs.h
changeset 0 671dee74050a
child 1 6f2c1c46032b
equal deleted inserted replaced
-1:000000000000 0:671dee74050a
       
     1 /*
       
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __CPIXMAINDEFS_H__
       
    19 #define __CPIXMAINDEFS_H__
       
    20 
       
    21 
       
    22 //
       
    23 //    TODO LIST
       
    24 //
       
    25 //    o paths, names, naming styles should be streamlined
       
    26 //
       
    27 
       
    28 
       
    29 // ***** MAIN ***** 
       
    30 
       
    31 
       
    32 /**
       
    33  * These two paths are for test tools only, not to be used by
       
    34  * harvesters and suchlike.
       
    35  */
       
    36 #define CPIX_TEST_INDEVICE_INDEXDB_PHMEM   "c:\\data\\indexing\\indexdb"
       
    37 #define CPIX_TEST_INDEVICE_INDEXDB_MMC     "e:\\data\\indexing\\indexdb"
       
    38 
       
    39 #define LCPIX_INDEVICE_INDEXDB        L"indexing\\indexdb"
       
    40 
       
    41 #define CPIX_INDEVICE_SERVERIO 	      "c:\\data\\indexing\\serverio"
       
    42 #define LCPIX_INDEVICE_SERVERIO 	  L"c:\\data\\indexing\\serverio"
       
    43 
       
    44 #define LROOT_APPCLASS  L"root"
       
    45 
       
    46 //***** CONTACT *****
       
    47 
       
    48 #define LCONTACT_QBASEAPPCLASS  L"@0:root contact"
       
    49 #define LCONTACTAPPCLASS  L"root contact"
       
    50 
       
    51 //***** CALENDAR *****
       
    52 
       
    53 #define LCALENDAR_QBASEAPPCLASS  L"@0:root calendar"
       
    54 #define LCALENDARAPPCLASS  L"root calendar"
       
    55 
       
    56 //***** BOOKMARKS *****
       
    57 #define BOOKMARK_QBASEAPPCLASS   "@0:root bookmark"
       
    58 #define LBOOKMARK_QBASEAPPCLASS  L"@0:root bookmark"
       
    59 #define BOOKMARKAPPCLASS   "root bookmark"
       
    60 #define LBOOKMARKAPPCLASS  L"root bookmark"
       
    61 
       
    62 //******* APPLICATIONS ****
       
    63 #define APPLICATIONS_QBASEAPPCLASS "@0:root applications"
       
    64 #define LAPPLICATIONS_QBASEAPPCLASS L"@0:root applications"
       
    65 #define APPLICATIONS_APPCLASS "root applications"
       
    66 #define LAPPLICATIONS_APPCLASS L"root applications"
       
    67 
       
    68 //***** MAPS *****
       
    69 
       
    70 #define LMAPS_BASEAPPCLASS  L"root maps"
       
    71 
       
    72 // Distance in KM from a reference point
       
    73 #define LDISTANCE_FIELD     L"Distance"
       
    74 
       
    75 //***** NOTES *****
       
    76 
       
    77 #define NOTES_QBASEAPPCLASS   "@0:root notes"
       
    78 #define LNOTES_QBASEAPPCLASS  L"@0:root notes"
       
    79 #define NOTESAPPCLASS   "root notes"
       
    80 #define LNOTESAPPCLASS  L"root notes"
       
    81    //
       
    82    // NOTE: Following fields are duplicated in SearchClient's Common.h
       
    83    //
       
    84 
       
    85    /**
       
    86     * The name of the mandatory field that will store the unique ID of
       
    87     * a document.
       
    88     */
       
    89 #define LCPIX_DOCUID_FIELD    L"_docuid"
       
    90 
       
    91    /**
       
    92     * The name of the mandatory field that will store the application
       
    93     * class of a document.
       
    94     */
       
    95 #define LCPIX_APPCLASS_FIELD  L"_appclass"
       
    96 #define LCPIX_UNTOKENIZED_APPCLASS_FIELD L"_appclass_ut"
       
    97    /**
       
    98     * The name of the optional field that will store the excerpt text
       
    99     * for a document.
       
   100     */
       
   101 #define LCPIX_EXCERPT_FIELD   L"_excerpt"
       
   102 
       
   103    /**
       
   104     * The name of the optional field that will store the application
       
   105     * ID of the document.
       
   106     */
       
   107 #define LCPIX_MIMETYPE_FIELD     L"_mimetype"
       
   108 
       
   109    /**
       
   110     * The default field to search for (aggregate of the contents of
       
   111     * other fields).
       
   112     */
       
   113 #define LCPIX_DEFAULT_FIELD   L"_aggregate"
       
   114 
       
   115 
       
   116    /**
       
   117     * Documents, as created by the client may undergo a further
       
   118     * the document. Such pre-index processing stage is invoked by
       
   119     * processing stage that may remove from, or add multiple fields to
       
   120     * putting an extra field with the value for the filter ID
       
   121     * identifying the filter to do the processing. (For instance, file
       
   122     * parser filter.) This special field is only to kick-start the
       
   123     * pre-index processing stage and identify the filter that does the
       
   124     * processing, but the field itself will be removed before actual
       
   125     * indexing!
       
   126     *
       
   127     * When defining a filter id, make sure to define the following flags:
       
   128     *
       
   129     *     cpix_STORE_YES | cpix_INDEX_NO,
       
   130     *
       
   131     * as clucene is known for misbehaviour if fields are removed and
       
   132     * re-added with different flags.
       
   133     */
       
   134 #define LCPIX_FILTERID_FIELD  L"_FilterId"
       
   135 
       
   136 /**
       
   137  * Filter ID for the quadrant processing filter. This filter:
       
   138  *
       
   139  * (a) Assumes to find GPS coordinates in two fields: LLATITUDE_FIELD
       
   140  *     and LLONGITUDE_FIELD. The coordinates should be in a
       
   141  *     floating-point, decimal notation, negative values for southern
       
   142  *     latitudes and western longitudes. These fields will be left
       
   143  *     on the document, unremoved.
       
   144  *
       
   145  * (b) From the GPS coordinate, it will generate a QNR_FIELD.
       
   146  *
       
   147  * (c) From that point on, a document with that QNR_FIELD defined is a
       
   148  *     subject for quad qry types (geological search).
       
   149  *
       
   150  */
       
   151 #define LCPIX_QUADFILTER_FID L"QuadFilter"
       
   152 
       
   153 
       
   154    /**
       
   155     * Filter ID for the fileparser filter. This filter
       
   156     *
       
   157     * (a) uses the doc uid field as a filesystem path to get the
       
   158     * contents of the file
       
   159     *
       
   160     * (b) creates one or multiple fields, based on the content of the
       
   161     * file.
       
   162     *
       
   163     * (c) Also creates the excerpt field
       
   164     */
       
   165 #define LCPIX_FILEPARSER_FID   L"FileParser"
       
   166 
       
   167 
       
   168 
       
   169    
       
   170 
       
   171    /**
       
   172     * Term textual content. Used in documents forming term list that
       
   173     * is returned by suggest method.
       
   174     */
       
   175 #define LTERM_TEXT_FIELD       L"Term"
       
   176 
       
   177    /**
       
   178     * Term's document frequence. Used in documents forming term list
       
   179     * that is returned by suggest method.
       
   180     */
       
   181 #define LTERM_DOCFREQ_FIELD   L"DocFreq"
       
   182  
       
   183    
       
   184 
       
   185    /**
       
   186     * This is the directory CPix will use to store its internal data,
       
   187     * like cpixreg.txt as well as indexes with automatic paths
       
   188     * (automatic = harvester / owner app does not care where it
       
   189     * is).
       
   190  */
       
   191 #define DEFAULT_CPIX_DIR "c:\\Data\\"
       
   192 #define DEFAULT_CLUCENE_LOCK_DIR "c:\\system\\temp"
       
   193 
       
   194 
       
   195 
       
   196 
       
   197 #define LMESSAGING_MIMETYPE 		L"application/messaging"
       
   198 #define LCONTACT_MIMETYPE			L"application/contact" //or "text/x-vcard", is not proved to be correct
       
   199 #define LCALENDAR_MIMETYPE 			L"application/v-calendar" //or "text/x-vcalendar", is not proved to be correct
       
   200 #define LTEXTFILE_MIMETYPE 			L"text/plain"
       
   201 #define LPDFFILE_MIMETYPE          L"pdf/plain"
       
   202 #define LJPGFILE_MIMETYPE 			L"image/jpg"
       
   203 #define LMP3FILE_MIMETYPE 			L"audio/mp3"
       
   204 #define BOOKMARK_MIMETYPE            "application/bookmark"
       
   205 #define LBOOKMARK_MIMETYPE           L"application/bookmark"
       
   206 #define APPLICATION_MIMETYPE    "application/application"
       
   207 #define LAPPLICATION_MIMETYPE    L"application/application"
       
   208 #define NOTES_MIMETYPE               "application/notes"
       
   209 #define LNOTES_MIMETYPE               L"application/notes"
       
   210 
       
   211 /* 
       
   212  * Analyzer definition related constants  
       
   213  *********************************************** 
       
   214  */
       
   215 
       
   216 #define CPIX_PIPE 	  		L">"
       
   217 #define CPIX_SWITCH 	  	L"switch"
       
   218 #define CPIX_CASE 	 		L"case"
       
   219 #define CPIX_DEFAULT  		L"default"
       
   220 
       
   221 #define CPIX_ANALYZER_STANDARD  	L"standard" 
       
   222 #define CPIX_ANALYZER_DEFAULT   	L"standard"  
       
   223 
       
   224 #define CPIX_TOKENIZER_STANDARD    	L"stdtokens" 
       
   225 #define CPIX_TOKENIZER_WHITESPACE  	L"whitespace"
       
   226 #define CPIX_TOKENIZER_LETTER  		L"letter"
       
   227 #define CPIX_TOKENIZER_KEYWORD  	L"keyword"
       
   228 
       
   229 #define CPIX_FILTER_STANDARD  	  	L"stdfilter"
       
   230 #define CPIX_FILTER_LOWERCASE  		L"lowercase"
       
   231 #define CPIX_FILTER_ACCENT  		L"accent"
       
   232 #define CPIX_FILTER_STOP  		  	L"stop" 
       
   233 #define CPIX_FILTER_STEM 		  	L"stem"
       
   234 #define CPIX_FILTER_LENGTH			L"length"
       
   235 
       
   236 #define CPIX_WLANG_EN				L"en" 
       
   237 #define CPIX_WLANG_FI	    	  	L"fi"
       
   238 #define CPIX_WLANG_HU	          	L"hu" 
       
   239 #define CPIX_WLANG_RU	    	  	L"ru"
       
   240 
       
   241 #endif /*__CPIXMAINDEFS_H__*/