Query syntax: Add support for spaces in field names
See original GitHub issueAt the moment fields can be registered statically or dynamically with spaces in them:
var index = new FullTextIndexBuilder<int>()
.WithObjectTokenization<Customer>(o => o
.WithId(c => c.CustomerId)
.WithField("Customer Name", c=>c.Name)
But there’s no way using the LIFTI query syntax to filter on a field name with a space in it:
Customer Name=Something
The first part of the field name becomes part of the query.
We need to introduce something to quote a field name, e.g.
[Customer Name]=Something
We’d need to allow for edge cases where the field name contains a close bracket and it needs to be escaped.
Issue Analytics
- State:
- Created 3 months ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to write SQL queries with spaces in column names
DML SQL query with space in a column name. When we run INSERT, UPDATE, and DELETE statements, we must use a square bracket...
Read more >sql - How to select a column name with a space in MySQL
I am working on a project where another developer created a table with column names like 'Business Name' . That is a space...
Read more >How to select a column name with spaces in MySQL
To select a column name with spaces, use the back tick symbol with column name. The symbol is ( ` `). Back tick...
Read more >How to write SQL Statements With Spaces In Column Names
You can use `. $query = \Drupal::database()->select('Product_Details', 'n'); $query->addField('n', 'S.No.'); $query->condition('n. · Thanks for ...
Read more >How do you select a column with spaces in SQL?
To select a column name with spaces, use the back tick symbol with column name. The symbol is ( ` `). Back tick...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m going to split wildcards out to #77 - they add significant complexity and implementing this feature without them add its own value.
It would also be be nice to match multiple fields against the same expression. Let’s assume I want to match the same query against the UTF8 and the ASCII representation of a customer name:
If possible, I’d like a query without repetition, e.g.
[Customer Name|Customer ASCII Name]=Something
Or let’s assume I want to search a group of dynamic fields sharing the same same prefix or suffix - then I’d like to query those with
[prefix*]=query
or[*suffix]=query
.Obviously, this can be worked around by OR-combining the same query for different field names - so it may really just a be a convenience feature for people manually writing LIFTI queries.