Tech Blog Menu

Tech Blog

Ad-hoc parsing using parser combinators

Written By
Martin Laporte

If you work for any given amount of time as a software developer, one problem you’ll end up with is parsing structured text to extract meaningful information.

Read more...

Using Java 8 with Mockito

Written By
Guillaume Simard

EDIT: With Mockito 2 you no longer need to use the following method. Lambdas are supported out of the box. You can use argThat(str -> str.length >5).

Java 8 is pretty cool. We (finally!) got Lambda Expressions in Java and a lot of other goodies. At Coveo, we started working with Java 8 as soon as the first stable release was available. As mentioned in my previous blog post, one way we’re using Java 8 is in our unit tests.

Read more...

Grouping related search results

Written By
Carl Bolduc

The JavaScript Search Framework is a step forward in website integration. It was a natural fit when we decided to launch our Q&A site. Here is how we managed to display a question and its answer(s) together in the search results.

Read more...

Getting the most out of relevancy

Written By
Karel Mpungi

You probably wondered how come a result is coming first and not the other when performing a query. Why is the search result ranked in a certain way and what can you do about it?

Read more...

Coveo for Sitecore troubleshooting

Written By
Simon Langevin

Coveo for Sitecore has been out for a few months now and we had to rethink the way we index search and of course, for us, support and maintenance people, the way we tackle the issues popping here and there.

Read more...

Better unit test assertions in Java

Written By
Guillaume Simard

If you’ve ever written a unit test in Java, you’ve probably used JUnit 4 and done something like this:

public class CompanyTest {
private Company company;
@Before
public void setup()
{
company = new Company();
}

@Test
public void getEmployees()
{
company.addEmployee("John");
company.addEmployee("Susan");
assertEquals(company.getEmployees().size(), 2);
}
}

This is okay and gets the job done. However, I think there are some issues with this approach.

Read more...

Adding server-side scripting

Written By
Martin Laporte

Recently, I’ve spent some time adding support for server-side scripts in Coveo’s Search API component. In a Coveo setup, the Search API provides the backend through which our JS UI framework executes queries on the index, using REST requests. Queries go through what we call the Query Pipeline. The Query Pipeline provides various ways to alter the query before it’s finally sent to the index server, and now offers scriptable extension points where you can implement complex custom logic when needed.

Read more...

Newer >