How to reindex after adding a new field - azure

I added a new field. This field is present in pretty much all the data rows that Azure search will be returned and needs to be indexed.
Changed the VIEW that returns rows to AzureSearch to return a new row ("name")
Added a new field to the Index ("name")
Verified via Search Explorer that "name" field is returned in results for that index. It is currently always null (as expected) in the results.
Now how do I trigger a full reindex so the "name" field will contain values for ALL the rows, and not just for the NEW rows going forward.
(of course, I could delete the index and recreate a new one and repoint my code to the new index, but it seems needlessly brute force!)

Right, reset the indexer's change tracking state using Reset Indexer API. You can also reset the indexer in Azure Portal or using .NET client SDK.

Related

Track Deletion with combined index Azure Cognitive Search

I have a combined index that crawls data from Azure SQL and Blob and are mapped based a common column.
The mapped blob document is optional.
When there is no blob document the search indexer indexes the respective SQL row setting the content propertyas null and if the document is available the content property shows correct data.
I have enabled BLOB deletion tracking and the issue comes when a blob document is deleted. The deletion policy triggers and also removes the mapped SQL row values from index.
I was expecting that the content property will be set to null, but the deletion policy also removes the mapped SQL row values from index.
What am I doing wrong? Kindly help.
Thanks a lot in advance..
BR
The behavior you are seeing is by default. SQL Deletion Policy deletes full index documents based on their document Key, not specific fields. The policy doesn't have a way to know the index has values from other sources too. If there is a combined index and you would like the behavior you are looking for, you may try instead using a Logic App SQL trigger to update only specific fields with Add, update or delete documents, instead of the Deletion Policy.

How can delete azure search old document and add new document which is refreshed recently in indexer?

I have created a azure search service and trying to import data using azure SQL data source and I have scheduled it to refresh the data. Data is getting refreshed properly in data source as I can verify it through indexer and index. However, in index it's getting added every time with initial document but I want only newly/updated documents in index for example if initial no. of document in index was 150 then after refresh it's increases to 156 but I want only 6 document their after refresh.
I tried both option high watermark and soft delete.
Azure Search is designed to incrementally add new documents automatically. So you could delete documents first and then upload documents.
However, delete document you need to specify field in document, currently there's no way to delete all the documents from an index. As you suspected deleting and re-creating the index is the way to go. Also you could vote up this feedback.
If you still want the feature that remove the initial document you could add an item to our userVoice page.

How to automatically update data source and index for a view in Azure Search

How can I update the exiting data source which is create from azure SQL view.
What are steps I need to follow once when dealing with azure search for Database view.
My Data source& index should be updated once my view gets updates.
Assuming that by "updating the view" you mean adding more columns to the SELECT clause:
You don't need to update the datasource as long as you didn't change the name of the view or the credentials.
You will need to add newly added fields to your index definition. This doesn't happen automatically. Once you add new fields to your index schema, indexer will start populating those fields for newly indexed rows. To populate documents that have already been indexed, reset the indexer (in the portal or using the Reset Indexer API).

Filtering a repeating table linked to a secondary datasource

I have an infopath form based on a sharepoint list (worktracker).
In that form there is a repeating section which holds data from a secondary source which is the worktracker list again.
I would like to filter that table using the value in a field on the form - this enables me to run a check on duplicate items on the list by using a calculated checking reference.
I have done this by using conditional formatting to hide the non-matching items but that this killing my form as IE throws tantrum as it takes too long.
Does anyone know another way to do this? I am stuck using IE8 - not my choice!
UPDATE:
So since posting the above, I had since tried using a REST connection which doesn't work as my list is too big. I have also tried using an XML connection to a filtered view and that didn't work either!
Cheers,
In the form, select the value field. Create a rule that sets the secondary data source's query field of the same name to that value. Then query the secondary data source. It will only return the items where the value matches.

Query problem with lookup column in SharePoint

Setup:
I have two lists on a SharePoint site, A and B. List A has a column 'b' that is a lookup to the ID field of list B. I have 500k+ records in A and about 6k records in B.
What works:
I am able to execute a query for items in list A using SharePoint web services, and am even able to filter the query based on a specific "lookup" value for column 'b'. For example, I can query for items in A whose column b matches 1234 (...<Value Type="Lookup">1234</Value>...), and so on.
What doesn't work:
The query does not work for items older than a specific date, even though my query does not involve dates in any way -- only the lookup column. Any query on data newer than two years old works fine, anything older than that fails. If I view items from the SharePoint web page they appear ok, and all the links from child records in B to parent records in A work just fine -- the lookup columns appear intact.
Question:
Is there some kind of maintenance task in SharePoint that can cause some underlying data to get corrupted that can prevent a query based on a lookup id to stop working, like a system restore, etc? In other words, the lookup column data appears correct on the surface in the web browser. But does SharePoint represent this value with a GUID or other invisible data that might be out of sync or stale?
Thanks.
Maybe you are hitting another limit; the maximum number of items retrieved in a query?
See list throttling
Try querying by the ID by adding the LookupId=”TRUE” attribute to your FieldRef element.
http://abstractspaces.wordpress.com/2008/05/05/caml-query-lookup-field-by-id-not-by-value/
The problem appears to be related to the fact that the column in question was indexed. When I removed the index everything started working. When I reapplied the index, everything kept on working. I'm attributing this problem to a corrupt index.

Resources