Using the Solr API, how do I set a defined field to the unique key? - api

I'm implementing a version 7.5 Solr indexing system. I have successfully created the core, created field types, and created fields all using the API posting JSON.
How can I now set one of my defined fields to be the unique key, also using the API?

It's currently not possible to set the unique key (SOLR-7242) through the Schema API.
Manually changing the definition in your schema file is still how you'll have to do it.

Related

How to access Bigquery using key

I was given a key which happens to be a .json file to access a bigquery data but I have no idea where to put it and how I should use it. I tried to go to the bigquery console but I can't seem to find where I can place the key to view their data. I have no experience using bigquery so I tried to search for any tutorials to no avail.
I can assume that you have created service account key with assigned roles (i.e. roles/bigquery.admin) and downloaded a JSON file that contains your key.
You will need to use it only whenever you decide to use BigQuery API by using client libraries, such as Python or Java. As you can see in the documentation, you need to set the environment variable GOOGLE_APPLICATION_CREDENTIALS to the path of the JSON file that contains your service account key to be able to access Bigquery resources.
When using the web UI in the Google Cloud Console, you don't need to use JSON key file. You only need to take care of assigning appropriate roles to the service account you have created. Please take a look for the following documentation.
Additionally, I would like to share with you the introduction to authentication, which is really important.
I hope you find the above pieces of information useful.

Can I use my existing server type api key for GCM 8.4?

I'd like to update to GCM 8.4 from 8.3, but part of the new process requires auto generation of a json file. I tried that with my existing project, but it created a new api key of type "Android" while the api key I was using before was of type "Server". Is it possible to use my existing "Server" key so that existing users continue getting push notifications? If so how am I supposed to go about doing so?
I can manually edit the json file, but I'm not sure how the old data I was using corresponds. The old information I have is the GCM_PROJECT_ID and a GCM_CLIENT_ID (same as project id except with some sort of hash and has "apps.googleusercontent.com").
Any help is appreciated.

Index data from Data Providers in Sitecore 7

I have a data provider that integrates content into a Sitecore 7 solution. How can I get indexing working for the data provided? At the moment none of the content provided by the data providers is indexed. Is there a way to add some kind of indexer for this content?
As per default if the data that you imported into Sitecore is published to the web database, for all of those files the index will be updated. To be able to search on custom fields, you should adjust the default search configuration to make the indexer pickup the fields. For more information I would like to redirect you to the Sitecore documentation here:
http://sdn.sitecore.net/Reference/Sitecore%207/Developers%20Guide%20to%20Item%20Buckets%20and%20Search.aspx
It turned out that this was handled OOTB it just took a while to index all the data.
There is good documentation here:
http://sdn.sitecore.net/Developer/Integrating%20External%20Data%20Sources.aspx
http://sdn.sitecore.net/Reference/Sitecore%207/Sitecore%20Search%20and%20Indexing%20Guide.aspx

SalesForce API: No such column 'AnnualRevenue' on entity 'Account'

While retrieving basic data using the SalesForce REST API, I encountered the following errors. They seem to follow the pattern of; me asking for non-existent fields.
[{"message":"\nSELECT AnnualRevenue,CreatedDate,Id,LastActivityDate\n ^\nERROR at Row:1:Column:8\nNo such column 'AnnualRevenue' on entity 'Account'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.","errorCode":"INVALID_FIELD"}]
[{"message":"\nSELECT AnnualRevenue,CreatedDate,ConvertedAccountId\n ^\nERROR at Row:1:Column:8\nNo such column 'AnnualRevenue' on entity 'Lead'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.","errorCode":"INVALID_FIELD"}]
[{"message":"\nAccountId,Amount,CloseDate,CreatedDate,ExpectedRevenue,ForecastCategoryName\n ^\nERROR at Row:1:Column:47\nNo such column 'ExpectedRevenue' on entity 'Opportunity'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.","errorCode":"INVALID_FIELD"}]
But the fields obviously exist, I can see them in the my Dev account. Is it possible that, these fields do not exist for certain types of SalesForce Accounts (Professional, Dev, Ultimate, Enterprise etc)?
To get the application working I removed the fields from the SOQL, and instead used different fields, but not all had replacements. Anyhow... any insight is appreciated.
Thanks
I'm not super familiar with the REST API, but this sounds like a privileges issue to me. Are you sure that the account you are using can see these fields? Check Field Level Security. I'm pretty sure that Expected Revenue, for example, is invisible by default.
These fields should exist for all versions of Salesforce.

REST API - Put Method best Practices

I'm designing a restful API using the ASP.NET MVC Web API stack. I am allowing users to create/update/delete records using the relevant HTTP verb. I accept both XML and JSON content types. I'm currently designing the put (update) method on my first endpoint and ran into a question:
I'm wondering what the best practices are for null/empty fields when updating via an API. Should a null/empty field indicate that the consumer is ignoring the field and does not want it updated or that the field which may or may not have previously had a value, should not currently have a value?
Specifically, when a field has data and an update is sent with null/empty data should this field be a) ignored the b) updated and nulled in the DB
I assume that this is something that comes up a lot, but I haven't been able to find any substantive information (mainly due to the lack of an appropriate search term)
The verb PATCH has been created for partial update.
I would use PUT for full update and PATCH for partial ones. If I remember correctly, support for PATCH is in ASP.NET Web API RC.