In Lucene.NET, how to reuse the indexed data that is created using SOLR.NET - c#-4.0

I have a written a sample project in which i have created an index using SOLR.NET (.NET Wrapper Java Based SOLR)
I want to remove the dependency of Java. So i am trying Lucene.NET.
Now is it possible to re-use the same indexed data (Created with SOLR.NET & SOLR) and perform searches / updates to that index data using LUCENE.NET?
Environment: VS2013, C#, .NET Framework 4.0, WinForms

The Lucene codec format evolves over time, and most alternative Lucene implementation are only compatible with a specific range of versions. So the answer is "it depends, but probably not". You'd have to try to read the segment files present in your Solr installation with Lucene.NET instead.
Remember that this moves Solr from being a distributed dependency (running as a separate server) to an in-process dependency instead - requiring you to write your own service on top of Lucene.NET if you want to keep it distributed.
As you've just written a sample project, drop everything you've indexed and re-index with your own code for Lucene.NET instead.

Related

Use TemplateContext instead of TemplateContext?

I just upgraded my project from ServiceStack 5.1 to 5.5.1. Now where I am using TemplateContext from ServiceStack.Templates it tells instead to use TemplateContext. Needless to say, this is likely a mistake in the description for the Obsolete attribute. What is the appropiate replacement for TemplateContext now in ServiceStack 5.5.1?
The depreciation message should’ve said to use ScriptContext instead.
In the latest ServiceStack v5.5 Release ServiceStack Templates has been rebranded to #Script.
The section on Migration to new Script API's explains how to migrate in more detail:
Migrating to the new APIs is fairly straight forward:
Change using ServiceStack.Templates; to using ServiceStack.Script;
Any classes with TemplatePage* has been renamed to SharpPage*
Any other class with a Template* prefix has been renamed to Script*
This change doesn’t affect any of your existing #Script source code whose existing syntax and available filters/methods remains unchanged.
New Terminology
The primary rationale for the rebranding was so we’re better able to label, describe and document all of #Script different features easier, so when referring to Templates View Engine we’re now calling Sharp Pages which is a better corollary to “Razor Pages” which it provides an alternative to.
Other re-branded features:
API Pages are now called Sharp APIs
Web Apps are now called Sharp Apps
Template Filters are now called Script Methods
Template Blocks are now called Script Blocks
The collection of methods you inject in your scripts like TemplateRedisFilters and TemplateDbFilters are now referred to as “Scripts” where they’ve been renamed to RedisScripts and DbScripts.

jHipster - simplify generation of the new APP if the DB already exists

does any tool exist that can simplify generation of the new APP if the DB already exists? I can create JDL file for new app manually base on existing DB - but I prefer to automate the process. This DB is part of old Spring Roo app.
Thank you.
The spring Roo 1.x version provides the "Database Reverse Engineering" functionality. This add-on allows you to create an application tier of JPA 2.0 entities based on the tables in your database. DBRE will also incrementally maintain your application tier if you add or remove tables and columns.
After generate the entities, you could execute the necessary web mvc commands to generate the complete application.
However, remember that the Spring Roo 1.x is not beeing maintained, because uses old technologies.
See more about the DBRE process here:
http://docs.spring.io/spring-roo/reference/html/base-dbre.html
Hope it helps,
There's a JHipster module that is being developed for this purpose: https://github.com/bastienmichaux/generator-jhipster-db-helper
It is probably not ready yet but could be a good start.

How to use CouchDB in Sails.js

I want to create a web in node js with the using the "Sails.js" framework and "CouchDB" database. I have check its package and I found lots of package for that.
https://www.npmjs.com/search?q=couchdb
So any one can suggest which package I can used for my application and also want to know for this I need to create a custom adapter.
If there has no requirement of create a custom adapter, so can I use the sails module feature.
The most popular CouchDB adapter in JS :
PouchDB
nanoDB
They are both available on NPM.
PouchDB has a lot of features and his API is easy to use. It also supports a lot of return types (callbacks,promises, async/await). There's also a lot of plugins around PouchDB.
As for nanoDB, it has less features(since it`s minimalist) but it covers all the general features of CouchDB.
Note: nanoDB normal implementation is with callbacks(which can be very ugly). There is an implementation of nanoDB with promises here.
You can take a look also to this adapter sails-couchdb-orm, but it could be no longer maintained. If you plan deploying your project using IBM Bluemix, you should try using sails-cloudant-orm. Cloudant is based on Apache CouchDB.

Connect Appserver of progress open edge through node.js

Does anyone have experience, information or some (coding) examples about a solution to establish a connection between the appserver of progress and node.js!? The aim is to create REST-Services to the db which can be accessed by the web like an angular-app.
Thanks for any advice
Christian
Starting with 11.2 (and enhanced in later versions) you can create REST-based applications utilizing the AppServer as a platform. ProDatasets are used as output (they convert easily to xml and/or json).
This is all explained in the Web Services part of the documentation. I'm providing a link below.
Basic steps
You need to consult the manual for all these steps...
Create an ABL program with input parameters (could be a parameter, a temp-table or a dataset) and and a single output parameter (could be a temp-table, a dataset or a single character or longchar parameter).
Add ABL-specific REST annotation to the program
Map the parameters in OpenEdge Studio
Setup REST agents with the restman utility
Export a "WAR-file" and deploy your webservice.
Calling the web service from node.js should be no greater problem than calling any REST based web service.
In versions prior to 11.2 you can "fake it and make it" utilizing WebSpeed. You can create a webspeed program that read parameters from the query-string (using get-field()) and then writes a response to the "webstream". Use either the WRITE-XML or WRITE-JSON methods on a temp-table or a dataset for writing the result. Don't forget to add a good MIME type though... This might not be as robust and customizable but it will work...
OE 11.4 Product Documentation - Web Services See chapter "II Creating OpenEdge REST Web Services"
These might also be useful:
OE 11.4 Product Documentation - Working with XML
OE 11.4 Product Documentation - Working with JSON

Use Liferay Hook to load data (page,web content,structure...)

Im working in Liferay 5.2.3 and i need to load data (create page, add portlet in some page, create some structure, add web content in the structure..).
I heard that a way to do that is to use hook to deploy this script (java class which user liferay api to load data), but i think that a hook project liferay must not be use in this way, the data should be load one time and not always, the load data doesn't modify the behavior liferay, just load data...
Do you think Using Hook for this case is a good way ? Or I should use a normal project java to load data which i will launch by a executable file.
Thank you.
Have a look at the sevencogs-hook code: This does exactly what you're asking for (and neatly documents the use of the API)
Careful though: In 5.2.3 it checks if "Bruno" exists in the database (the sevencogs administrator) - if he's not there, it will wipe out the contents and populate it with the sevencogs data. Later versions use an upgrade action that is a lot safer, e.g. running only once.
And - you really want to upgrade to the latest version: 5.2.3 is ancient

Resources