I want to be able to also search by specific field when i search in the search box.
Solr already has a 'text' field that is used by default and this field also covers other fields (e.g. title, notes, tags). It works when I query in Solr without specifying any fields. But when I search without specifying a field in the CKAN search box, it doesn't work.
This is exactly what I want:
When I type "example" directly instead of "title:example", I want it to automatically search in the fields specified in the CKAN schema.
You should have enabled datastore extension to perform full text search
q (string or dictionary) – full text query. If it’s a string, it’ll
search on all fields on each row. If it’s a dictionary as {“key1”:
“a”, “key2”: “b”}, it’ll search on each specific field (optional)
https://docs.ckan.org/en/2.9/maintaining/datastore.html#ckanext.datastore.logic.action.datastore_search
Related
I want to search through my content using Solr. My question is, is there a possibility to search for a text, which contains a certain character sequence?
Example: I have a text like "This is my Regitrationmail"
I want a query for the search of "registration" or "mail" or even "Registrationm" etc. etc.
Also the query should match if the content or the title match the query.
this is my current query:
q=text:registration~20
Thanks for your help!
I am creating a Saved Search for my team where users can filter by different parameters but the most important one is a ‘Keyword’ field where we have multiple text strings separated by commas. Eg: One could be (Horses, Apples, Cows, Carrots, Balloons) and another could be (Apples, Cake, Silver, Horses, Bananas)
I want to be able to use the free text search field to look up all rows where I can find a relevant entry.
Eg. Let’s say I type “Apples” and “Horses”. I want to see all entries where these are found together.
I have tried setting the criteria to “Contains” but can’t seem to use operators in the input field. I have also tried to use expressions but got You cannot use an expression builder criteria filter as an available filter" as an error.
I’m not familiar with NetSuite but willing to learn. I was able to create this in Google Sheets. Since we already store our information on NS already, I want to find a way to do it there. Is there a way to achieve this?
Thank you.
When you create the saved search, you can just specify a default value that will be used in the initial search load (e.g. contains Apples). In the Available Filters tab, select the same filter and check Show in Filter Region.
When users run the saved search, they can change the criteria by typing into the field and pressing Tab after (if you press Enter instead of Tab, the results will be downloaded into a CSV file instead of being displayed in the page). In your example, they should type 'apples%horses' then press Tab.
Additional reference: https://www.sikich.com/insight/using-formula-values-as-available-filters-in-netsuite-saved-searches/
Update:
Use 'has keywords' instead of 'contains' in the filter. When viewing the results, separate keywords with a comma. Example: 'apples, horses'
I am trying to understand how Azure Search Service works. If you have a comma delimited file that contains 4 fields, do you have to create an Index that contains all four fields? If you don't care about one of the fields in the comma delimited file, can you just not include it in the Index definition? When you upload the data (using code) will Azure Search Service just ignore the additional field, throw an error, or create a new field in the index?
If you have a comma delimited file that contains 4 fields, do you have
to create an Index that contains all four fields?
Not really.
If you don't care about one of the fields in the comma delimited file,
can you just not include it in the Index definition?
Yes, you can certainly do that. If you really don't care about the field then you can simply skip that field during the import process. You don't really have to create a field for that as well.
Yet another option would be to include the field and set its attribute in such a way that you are not able to perform any searches on that field. For example, you can set this field's searchable and filterable attributes to false but set retrievable attribute to true so that you can at least see this in your search results. More about field attributes can be found here: https://learn.microsoft.com/en-us/rest/api/searchservice/create-index#bkmk_indexAttrib.
I have application which has solr search facility. When i query for search result comes only fields which has the values. How to get the result with empty field values in solr? How to get all the fields in result even though the value of a field is empty?
Only the fields present is stored with each document, so if you want to keep empty fields actually available, you'll have to explicitly index empty content into the field. How you do that depends on how you're indexing documents to Solr today.
You can work around this by fetching the schema for the core / collection you're querying first, retrieve the field names and adding empty fields for each field present in the schema, if necessary.
It'll probably be easier to assume that missing fields are empty, and wrap your code in a check to see if the field is present, and if not, return an empty value instead.
The reason for this is that while Solr uses a schema, the underlying Lucene library does not - any document can contain a set of field names unrelated to the other documents present in the index. Since the schema can change independent of the content of the index as well (a schema change will not update existing documents), returning non-existing fields isn't straight forward - and for most cases the document returned should be as close to possible to what was actually indexed.
I have an xpage inside an indexed Lotus Notes database. There is a view control on the xpage (its data source being a Notes view), and since I plan to add a search text field to the xpage, I have been testing the view control "search" property (data\data\search). The documents on the database have text, date and numeric fields. When I look for something located on one of the text fields (e.g., koala), it works, but when I look for a date or a number no documents are found.
I wonder if this could be a localization problem, since in Spain we write the dates with format dd/mm/yyyy and the decimal character in numbers is the comma, but I also tried searching with format mm/dd/yyyy and using the point for decimals, and still no results are retrieved.
I also tried changing the searchFuzzy property on the view control, but nothing changed.
Thanks a lot,
Carlos
Can you post the search syntax you're using? It's hard to diagnose the exact cause. Dates and times definitely work in full text searches.
I'm sorry in advance if you've already excluded any of these. The page in the Notes Help entitled "How can I refine a search query using operators" defines the correct syntax for full text searching, that will allow you to confirm you've got the right syntax.
Also, try doing the same search in the search bar of a view in Notes client. That will help diagnose if it's a problem with search criteria or XPages. (I've used searches in a variety of databases and I'm not aware of any specific problems in XPages.)
Also, have the field data types changed or do you use the same field name for different data types. Notes holds a separate table of the data type assigned to a field name. Once a document is created that has that field, that's the data type used for full text searching. It's not form specific. So if you have a field MyDate that's text on one form and date on another, you can't search both ways. http://www.intec.co.uk/full-text-search-musings/