A PCRE internal error occured. This might be caused by a faulty plugin

* [[topbar |Table of Contents]] * [[intro:overview:what|Introduction]] * [[install:home|Installation]] * [[install:editions|Product Editions]] * [[install:requirements|System Requirements]] * [[install:platforms|Supported Platforms]] * [[install:guides:home|Installation Guides]] * [[install:licensing:home|Licensing]] * [[install:releases:home|Release Notes]] * [[admin:home|Administration]] * [[admin:admin:home|Administration Basics]] * [[admin:admin:architecture:home|Omnidex Architecture]] * [[admin:admin:applications:home|Building Applications]] * [[admin:basics:home|Omnidex Fundamentals]] * [[admin:basics:environments:home|Omnidex Environments]] * [[admin:basics:sqlengine:home|Omnidex SQL Engine]] * [[admin:basics:updates:home|Omnidex Updates]] * [[admin:basics:network:home|Network Services]] * [[admin:indexing:home|Omnidex Indexing]] * [[admin:indexing:concepts:home|Indexing Concepts]] * [[admin:indexing:indexes:home|Indexing Options]] * [[admin:indexing:creation:home|Index Creation]] * [[admin:indexing:strategies:home|Indexing Strategies]] * [[admin:indexing:activecounts:home|ActiveCounts]] * [[admin:indexing:powersearch:home|PowerSearch]] * [[admin:indexing:autocomplete:home|AutoComplete]] * [[admin:indexing:text:home|Omnidex Text]] * [[admin:features:home|Omnidex Features]] * [[admin:features:snapshots:home|Omnidex Snapshots]] * [[admin:features:grids:home|Omnidex Grids]] * [[admin:features:rollups:home|Rollup Tables]] * [[admin:features:geo:home|Geographic Searches]] * [[admin:features:expressioncols:home|Expression Columns]] * [[admin:features:segments:home|Omnidex Segments]] * [[admin:features:attach:home|Attaching Data]] * [[admin:features:export:home|Exporting Data]] * [[admin:optimization:home|Optimizing Queries]] * [[admin:optimization:plans:home|Query Plans]] * [[admin:optimization:caches:home|Dynamic Caches]] * [[admin:optimization:config:home|Configuring Omnidex]] * [[integration:home|Integration]] * [[integration:rdbms:home|Relational Databases]] * [[integration:rdbms:oracle:home|Oracle]] * [[integration:rdbms:sqlserver:home|SQL Server]] * [[integration:rdbms:mysql:home|MySQL]] * [[integration:rdbms:odbc:home|Generic ODBC]] * [[integration:rawdata:home|Raw Data Files]] * [[integration:rawdata:fixed:home|Fixed-length Files]] * [[integration:rawdata:delimited:home|Delimited Files]] * [[integration:rawdata:ost:home|Standalone Tables]] * [[dev:home|Development]] * [[dev:sql:home|Omnidex SQL]] * [[dev:sql:overview|Overview]] * [[dev:sql:statements:home|Statements]] * [[dev:sql:functions:home|Functions]] * [[dev:sql:examples:home|Examples]] * [[dev:connections:home|Connection Strings]] * [[dev:odbc:home|ODBC Interface]] * [[dev:jdbc:home|JDBC Interface]] * [[dev:debugging:home|Logging/Debugging]] * [[programs:home|Programs]] * [[programs:odxsql:home|OdxSQL]] * [[programs:odxnet:home|OdxNet]] * [[appendix:home|Appendix]] * [[dev:sql:home|Omnidex SQL]] * [[dev:sql:statements:home|Statements]] * [[dev:sql:functions:home|Functions]] * [[dev:sql:examples:home|Examples]] * [[http://www.omnidex.com/download/|Downloads]] * [[support:home|Support]]

~~NOTOC~~ {{page>:top_add&nofooter&noeditbtn}} ====== Administration: Omnidex Indexing ====== ===== AutoComplete ===== [[admin:indexing:autocomplete:home|Overview]] | [[admin:indexing:autocomplete:example|Example]] | **[[admin:indexing:autocomplete:sql|SQL]]** | [[admin:indexing:autocomplete:optimization|Optimization]] | [[admin:indexing:autocomplete:tips|Tips]] ---- ==== The SQL Behind AutoComplete ==== The SQL behind AutoComplete is a simple query requesting grouped counts. For QuickText indexes, it is necessary to use an optimization setting so that one value is returned for each parsed word, rather than one value for each row. === Initializing the Pull-Down Box === The following SQL statement provides the results shown in the previous example. Depending on the size of the database, it may be important to not issue a SQL statement until the user has typed two or three letters. That can dramatically affect the number of rows retrieved, and also the time required to query the Omnidex indexes. <code> select FNAME, count(*) from LIST where FNAME='Wil*' group by FNAME order by 2 desc with optimization=distinct_key; </code> This SQL statement will provide results that can then be placed into drop-down boxes as needed: <code> FNAME COUNT('*') ------------------------------------ WILLIAM 118130 WILLIE 19307 WILMA 5075 WILLARD 2350 WILLIS 1661 WILBUR 1660 WILBERT 1357 WILSON 1351 WILFRED 1141 WILL 826 WILLA 800 WILFREDO 698 WILLIAMS 626 WILEY 536 WILDA 457 WILFORD 428 WILMER 367 WILHELMINA 348 WILBURN 345 WILTON 280 WILLY 216 WILBER 175 WILLENE 163 WILLIAN 155 WILLIA 113 WILLETTE 104 WILLIEMAE 59 WILLODEAN 48 WILLENA 47 WILHEMINA 43 WILLOW 39 WILLETTA 35 32 rows returned </code> === Refining the Pull-Down Box === As the user types more letters, the contents of the pull-down box need to be updated. There are two approaches that can be taken. The recommended approach is to retain the contents of the initial query in memory, and then filter and redisplay them as the user types letters. This is generally much faster than re-querying the database and reduces the load on system resources. It is also possible to resubmit the query to the database with an additional letter added to the criteria, though care should be given to insure that performance does not degrade with this approach. === Subsequent Searches === As the user provides criteria to various fields, that criteria can also be included in the AutoComplete query. For example, the same statement above can be performed with criteria against the State and Last Name columns as shown below: <code> select FNAME, count(*) from LIST where STATE = 'NY' and LNAME = 'Myers' and FNAME='Wil*' group by FNAME order by 2 desc with optimization=distinct_key; </code> The AutoComplete choices and their counts will be correspondingly reduced to those in the State of New York with a Last Name of Myers: <code> FNAME COUNT('*') ------------------------ ---------- WILLIAM 6 WILDA 1 WILLARD 1 WILLIE 1 WILMA 1 WILMER 1 6 rows returned </code> ===== ===== **[[admin:indexing:autocomplete:example|Prev]]** | **[[admin:indexing:autocomplete:optimization|Next]]** ====== Additional Resources ====== See also: {{page>:admin:indexing:see_also&nofooter&noeditbtn}} {{page>:bottom_add&nofooter&noeditbtn}}

 
Back to top
admin/indexing/autocomplete/sql.txt ยท Last modified: 2016/06/28 22:38 (external edit)
 
 
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0