Are Cloudant indexes presisted? - cloudant

On what condition are Cloudant indexes deleted? I created five indexes via the web console on Monday and today I notice that only the default index on _id still remains.
I did delete all the records in the database earlier this week but not any of the indices. Are the indices deleted when the database contains no documents?

Cloudant indexes are stored in design documents. Design documents are like regular documents but their id is prefixed with _design/ with it's contents providing meaning to the database setting up views, query indexes etc. The important bit to note is that the design document is a regular document, so it's included in list for all documents in the dashboard. When you deleted the all the documents in the Dashboard, you also deleted the design documents.

Related

Multiple indexer for single index in Azure Search?

I have two data source one in MS SQL and one is Azure Table, both of them holds User's data but just different information.
Is there any risk or possible issues if I create two indexer for each of the data source and sync them into single index, so I can do one search instead of two.
I do not see option that allow me to create indexer only, so I wonder if Microsoft trying to prevent that or not.
When you have more than one indexer updating the same index, races between updates to the same document are possible since Azure Search does not yet support document versioning.
If the each indexer updates different document fields, then the order doesn't matter; if multiple indexers update the same field(s), then the last writer wins (and you can't control which indexer will be the last writer).
If you use a deletion detection policy to remove documents from the index, then, to avoid possible races, a document should be marked deleted in both SQL and Azure Table.
I do not see option that allow me to create indexer only, so I wonder if Microsoft trying to prevent that or not.
I don't understand the above question.

Where does Alfresco store the documents information in its database?

I'm working on an app that connects to alfresco database.
and I was looking in the tables for the table that contains documents information, and I couldn't find it. I found the table of tasks and other tables.
can anybody help me here?
The two most important tables, IMHO, are alf_node and alf_node_properties. Note, for each node you create you will get a single row in the former, and multiple rows in the latter, depending on the number of metadata associated with your node.
This is because metadata are stored as rows in alf_node_properties with qname_id column holding the information about metadata type.
All files that are stored in Alfresco are stored in what is referred to as the repository. The repository is a logical entity that consists of three important parts:
The physical content files that are uploaded (in {Alfresco_install_dir}/alf_data/contentstore)
The index files created when indexing the uploaded file so it is
searchable
The metadata/properties for the file, which are stored in a
relational database management system (RDBMS).
For more details check Repository concepts

How to Reindex documents in Solrcloud Mode without having original data source for retrieving all documents?

I need to re-index the documents in Solr cloud mode.
I also do not have the dataSource for completely re-indexing the documents after deleting all documents. Also is there any way to take the backup of the documents and re-index using the contents taken as backup? If I use backup and restore using command like below, I could observe the documents are not re-indexed.
http://{solrhost:port}/solr/{collection}/replication?command=backup
Also how to delete all the documents of core in Solr Cloud Mode in Single command? The command below deletes the documents in one of the Shards. How to delete the documents in all 5 shards of the Solr cloud?
http://{Sorlhost:port}/solr/{collectionname}/update?stream.body=:&commit=true
You can use the Collections API to backup and restore solr collections:
https://lucene.apache.org/solr/guide/6_6/collections-api.html#CollectionsAPI-backup
As for deleting all documents, you could use SolrJ and build a simple java application to connect to your cluster and execute a delete command using the query "*:*" to delete all things since that query will return all documents.
In place of using the backup and restore option, you can use the reindex collection api. This will allow you to choose a source and destination index to reindex the data without any additional configs. This is good if you dont have the initial datasource. For more details on the same, refer this : https://lucene.apache.org/solr/guide/8_1/collections-api.html#reindexcollection

Azure Search - Creating a dedicated search table in SQL, for using with an Indexer

I'm building an Assets search engine.
The data I need to be indexed for each assets is scattered into multiples tables in the SQL database.
Also, there is many events in the application that will trigger update to the asset indexed fields (in Draft, Rejected, Produced, ...).
I'm considering creating a new denormalized table in the SQL database that would exist solely for the Azure Search Index.
It would be an exact copy of the Azure Search Index fields.
The application would be responsible to fill and update the SQL table, through various event handlers.
I could then use an Azure SQL Indexer schedule to automatically import the data into the Azure Search Index.
PROS:
We are used to deal with sql table operations, so the application code remains standard, no need to learn the Azure Search API
Both the transactional and the search model are updated in the same SQL transaction (atomic). Then the Indexer update the index in an eventual consistent manner, and handle the retry logic.
Built-in support for change detection with SQL Integrated Change Tracking Policy
CONS:
Indexed data space usage is duplicated in the SQL database
Delayed Index update (minimum 5 minutes)
Do you see any other pros and cons ?
[EDIT 2017-01-26]
There is another big PRO for our usage.
During development, we regularly add/rename/remove fields from the Azure index. In its current state, some schema modifications to an Azure Index are not possible, we have to drop and re-create the index.
With a dedicated table containing the data, we simply issue a Reset to our indexer endpoint and the new index gets automatically re-populated.

couch db finding data without views

I want to know is there any way in Couch DB HTTP API to query database without VIEWS ? We can GET all documents / document with specific id but what if we want to query database with key other then ID, without using VIEWS ?
You cannot query a CouchDB database by anything other than primary key (ID) without using views. In CouchDB world, views are queries.
You can get the data from CouchDB without views using HTTP API of couchDB.
http://wiki.apache.org/couchdb/HTTP_Document_API
Documents stored in a CouchDB have a DocID. DocIDs are case-sensitive string identifiers that uniquely identify a document. Two documents cannot have the same identifier in the same database, they are considered the same document.
http://localhost:5984/test/some_doc_id
http://localhost:5984/test/another_doc_id
http://localhost:5984/test/BA1F48C5418E4E68E5183D5BD1F06476

Resources