At our company, we want to host different applications in the same domain. With AWS CloudFront it is easy to create a distribution and configure behaviors to serve these applications under a specific path.

So we get a structure, like this:

https://company.com/ → Landing Page
https://company.com/app/ → Webapp
https://company.com/api/

In case you search for a simple example to run a string through a Lucene filter in Java.

Here is an example.

import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.Tokenizer;
import org.apache.lucene.analysis.core.LetterTokenizer;
import org.apache.lucene.analysis.miscellaneous.ASCIIFoldingFilter;
import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;

private static List<String> process(String text) throws IOException {
Analyzer analyzer = new Analyzer() {
@Override
protected TokenStreamComponents createComponents(String s) {
Tokenizer tokenizer = new LetterTokenizer();
return new TokenStreamComponents(
tokenizer,
new ASCIIFoldingFilter(tokenizer)); } };

TokenStream tokenStream = analyzer.tokenStream("*", "text");
CharTermAttribute attr =
tokenStream.addAttribute(CharTermAttribute.class);

List<String> result = new ArrayList<>();

tokenStream.reset();
while (tokenStream.incrementToken()) {
result.add(attr.toString());
}
return result;
}

In this example, we use ASCIIFoldingFilter. It transforms special characters used in other languages than English into their ASCII equivalents.

Find more details on the JavaDoc page of Lucene.

Why feature branches suck and cherry-picking even more.

In recent years I accompanied some companies in the transition from svn to git. And again I got involved in such an endeavor.

Currently using svn and trunk-based development. Many teams working on a shared codebase. There are issues with conflicting changes…

Hallo Internet!

In sevDesk kann man ein Konto einer österreichischen Raiffeisen Bank ja prinzipiell einbinden. Nur kann es schwer sein die richtige Bank zu finden.

Gibt man in der Suche “Raiff” ein, werden die ersten 5 Treffer vorgeschlagen. Und zwar Raiffeisen Banken aus Deutschland. Die Liste der Vorschläge ist leider…

Philipp Steinwender

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store