I use the Simple Post tool to post PDF documents to Solr with PowerShell. Is there a way to post the document and update a field attribute simultaneously?
For example, my current command is:
java -Dauto -Dc=NameOfCore -Drecursive -jar /post.jar "/path/to/my/file.pdf"
Is there a parameter or argument that I can add to the command where I can pass a value of a field?
I'm on Windows and Using Solr 6.5.1
Very Similar Question:
Updating Solr field while posting .pdf document in Windows
Related
I am using Logstash-6.3.0 ,Elastic search-6.3.0 and Kibana-6.3.0 combination. I have some fields in kibana which are scripted.
I need to send an alert based on these values. I can send alert for elastic search fields using watcher plugin for kibana.
How do I configure kibana to send alert based on scripted field values?
I am using elastalert,if there are ways?
Solution using elastalert is fine.
I don't think you can query on scripted fields using ElastAlert as scripted field values are computed at the query time (in kibana only) and aren't indexed into the Elasticsearch hence cannot be queried on as ElastAlert only queries Elasticsearch directly.
As i am new to Node js ,could anyone please help me to provide procedure to find number of documents in a view of couchdb using nano.
for example , I have view '_design/settings/_view/settings' in couch db .Using nano i want to find no of documents present in this view.
When you query a view using nano, provide empty arrays for startkey and endkey parameters. This will return all the results in the view.The response will contain a total_rows variable which is the total number of results.
With LotusScript I can use Set notesDocumentCollection = db.GetProfileDocCollection() to get a collection of ALL the profile documents in a database. I would like to do the same using SSJS. However, database.getProfileDocCollection(profileName) obliges me to use a specific profile name. Is there any way in SSJS of getting a collection of ALL profile documents in a database (as is the case with LotusScript)?
You can get all profile documents with
var dc:NotesDocumentCollection = database.getProfileDocCollection(null);
Just set null as parameter. Tested it with Domino 8.5.3 FP6 and 9.0.1 FP1.
Looking at the Help, in Java there is only the method corresponding to the SSJS version you mentioned, passing a profile form name. It doesn't look like there's a Java equivalent to the LotusScript option of not passing a form name. So there will not be an in-built option.
Profile documents tend to get cached and it is a more significant issue on the web. I hit significant problems when I started with profile documents in XPages Help Application. That's why I changed to creating "pseudo-profile documents" by changing the UNID. See http://www.thenorth.com/apblog4.nsf/0/63F5C6B1F08957AC8525747D005AA429 and http://avatar.red-pill.mobi/nathan/escape.nsf//D6Plinks/NTFN-7GA4FJ
The NoteCollection class should let you find all profiles in a single search.
Is it possible to get a list of all the views of a database in couchdb using [dscape/nano][1]? The closest I can get with just curl request is this:
http://URL/DBNAME/_all_docs?key=_design/views&include_docs=true.
The above returns all the views including the javascript functions. But I would like to extract only the view names.
In newer CouchDB versions, you can use "_design_docs" to only list the views:
GET /dbname/_design_docs
This will get you the wanted list much faster than if you'd have to go through all the docs (_all_docs).
See 1.3.3. /{db}/_design_docs of the official documentation.
Note: The documentation as of today states this is new in CouchDB version 2.2, but I successfully tested it on 2.1.
Unfortunately the only possible way of doing this is by extracting view names from the result of the query you've included in your question. Futon is doing it this way when populating drop-down list of views, so I think it is safe to assume this is the only solution.
You may also want to change your query to the following to include all design documents, instead of just the one named views:
GET /dbname/_all_docs?startkey="_design/"&endkey="_design0"&include_docs=true
I want a metadata field getting values from database record. This metadata field should be added to document.
Can anyone provide a solution to my requirement.??
I presume you are using Liferay 6.1.
Web Content Structures
As for Web Content, you could programmatically create a JournalStructure (see JournalStuctureLocalServiceUtil) and populate the list of possible values for your structure field with values coming out of the database. You can put this "import code" inside a batch job, so your structure field and the values inside the external database are always in sync.
Document Metadata
How to do this with Metadata Sets is probably more interesting, as not only Dynamic Data Lists and Documents & Media use this in Liferay 6.1; as of 6.2, Web Content structures will utilize the same metadata API in favor of the old Journal API.
For this to implement, check out the xsd column of the DDMStructure table. It has more or less the same format as the XML for a JournalStructure, however there are more options available. Use DDMStructureLocalServiceUtil#addStructure to add such a new structure. Again, run this inside a batch so you always have the latest external DB values.