Index: tmp/org.txm.referencer.rcp/src/org/txm/referencer/rcp/editors/ReferencerEditor.java
===================================================================
--- tmp/org.txm.referencer.rcp/src/org/txm/referencer/rcp/editors/ReferencerEditor.java	(revision 3206)
+++ tmp/org.txm.referencer.rcp/src/org/txm/referencer/rcp/editors/ReferencerEditor.java	(revision 3207)
@@ -41,6 +41,7 @@
 import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Label;
@@ -54,6 +55,7 @@
 import org.txm.rcp.editors.listeners.ComputeSelectionListener;
 import org.txm.rcp.messages.TXMUIMessages;
 import org.txm.rcp.swt.GLComposite;
+import org.txm.rcp.swt.widget.AssistedChoiceQueryWidget;
 import org.txm.rcp.swt.widget.NavigationWidget;
 import org.txm.rcp.swt.widget.PropertiesSelector;
 import org.txm.rcp.swt.widget.QueryWidget;
@@ -117,7 +119,7 @@
 	
 	/** The querywidget. */
 	@Parameter(key = ReferencerPreferences.QUERY)
-	protected QueryWidget querywidget;
+	protected AssistedChoiceQueryWidget querywidget;
 	
 	/**
 	 * Word property selector.
@@ -125,6 +127,12 @@
 	@Parameter(key = ReferencerPreferences.UNIT_PROPERTY)
 	protected PropertiesSelector<Property> propertiesSelector;
 	
+	/**
+	 * Show counts button
+	 */
+	@Parameter(key = ReferencerPreferences.SHOW_COUNTS)
+	protected Button showCountsButton;
+	
 	/** The pattern area. */
 	@Parameter(key = ReferencerPreferences.PATTERN)
 	protected PropertiesSelector<StructuralUnitProperty> patternArea;
@@ -152,7 +160,7 @@
 		queryLabel.setText(TXMUIMessages.ampQuery);
 		queryLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
 		
-		querywidget = new QueryWidget(getMainParametersComposite(), SWT.None);
+		querywidget = new AssistedChoiceQueryWidget(getMainParametersComposite(), SWT.None, this.corpus);
 		querywidget.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
 		querywidget.addKeyListener(computeKeyListener);
 		
@@ -184,7 +192,12 @@
 		patternArea.setTitle(ReferencerUIMessages.referencePattern);
 		patternArea.addSelectionListener(computeSelectionListener);
 		
+		// [show counts]
+		showCountsButton = new Button(paramArea, SWT.CHECK);
+		showCountsButton.setText("Show counts");
+		showCountsButton.setSelection(referencer.getShowCounts());
 		
+		
 		// pagination
 		GLComposite navigationComposite = getBottomToolbar().installGLComposite("navigation", 1, false);
 		navigationComposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
@@ -270,7 +283,7 @@
 		viewer.getTable().setLinesVisible(true);
 		viewer.getTable().setHeaderVisible(true);
 		
-		viewer.setLabelProvider(new LineLabelProvider());
+		viewer.setLabelProvider(new LineLabelProvider(this.referencer));
 		viewer.setContentProvider(new LineContentProvider());
 		viewer.setInput(new ArrayList<Property>());
 		
Index: tmp/org.txm.referencer.rcp/src/org/txm/referencer/rcp/editors/LineLabelProvider.java
===================================================================
--- tmp/org.txm.referencer.rcp/src/org/txm/referencer/rcp/editors/LineLabelProvider.java	(revision 3206)
+++ tmp/org.txm.referencer.rcp/src/org/txm/referencer/rcp/editors/LineLabelProvider.java	(revision 3207)
@@ -39,6 +39,12 @@
  */
 public class LineLabelProvider implements ITableLabelProvider {
 
+	Referencer referencer;
+	
+	public LineLabelProvider(Referencer referencer) {
+		this.referencer = referencer;
+	}
+	
 	/* (non-Javadoc)
 	 * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
 	 */
@@ -61,7 +67,11 @@
 		case 2:
 			StringBuffer str = new StringBuffer();
 			for (String ref : line.getReferences()) {
-				str.append(", "+ref+"("+line.getCount(ref)+")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+				if (this.referencer.getShowCounts()) {
+					str.append(", "+ref+"("+line.getCount(ref)+")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+				} else {
+					str.append(", "+ref); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+				}
 			}
 			return str.substring(2); 
 		default:
Index: tmp/org.txm.referencer.core/src/org/txm/referencer/core/preferences/ReferencerPreferences.java
===================================================================
--- tmp/org.txm.referencer.core/src/org/txm/referencer/core/preferences/ReferencerPreferences.java	(revision 3206)
+++ tmp/org.txm.referencer.core/src/org/txm/referencer/core/preferences/ReferencerPreferences.java	(revision 3207)
@@ -14,6 +14,7 @@
 
 	public static final String SORT_BY_FREQUENCIES = "sort_by_frequencies"; //$NON-NLS-1$
 	public static final String PATTERN = "pattern"; //$NON-NLS-1$
+	public static final String SHOW_COUNTS = "show_counts";
 
 	
 	/**
@@ -37,5 +38,6 @@
 
 		preferences.put(UNIT_PROPERTY, TXMPreferences.DEFAULT_UNIT_PROPERTY); //$NON-NLS-1$
 		preferences.put(PATTERN, "text_id"); //$NON-NLS-1$
+		preferences.putBoolean(SHOW_COUNTS, true); //$NON-NLS-1$
 	}
 }
Index: tmp/org.txm.referencer.core/src/org/txm/referencer/core/functions/Referencer.java
===================================================================
--- tmp/org.txm.referencer.core/src/org/txm/referencer/core/functions/Referencer.java	(revision 3206)
+++ tmp/org.txm.referencer.core/src/org/txm/referencer/core/functions/Referencer.java	(revision 3207)
@@ -61,8 +61,12 @@
 import org.txm.core.results.Parameter;
 import org.txm.core.results.TXMParameters;
 import org.txm.core.results.TXMResult;
+import org.txm.objects.Match;
 import org.txm.referencer.core.messages.ReferencerCoreMessages;
 import org.txm.referencer.core.preferences.ReferencerPreferences;
+import org.txm.searchengine.core.IQuery;
+import org.txm.searchengine.core.Query;
+import org.txm.searchengine.core.Selection;
 import org.txm.searchengine.cqp.AbstractCqiClient;
 import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
 import org.txm.searchengine.cqp.corpus.CQPCorpus;
@@ -71,8 +75,9 @@
 import org.txm.searchengine.cqp.corpus.QueryResult;
 import org.txm.searchengine.cqp.corpus.StructuralUnitProperty;
 import org.txm.searchengine.cqp.corpus.WordProperty;
-import org.txm.searchengine.cqp.corpus.query.Match;
 import org.txm.searchengine.cqp.corpus.query.CQLQuery;
+//import org.txm.searchengine.cqp.corpus.query.Match;
+//import org.txm.searchengine.cqp.corpus.query.CQLQuery;
 import org.txm.searchengine.cqp.serverException.CqiServerError;
 import org.txm.statsengine.r.core.RWorkspace;
 import org.txm.statsengine.r.core.exceptions.RWorkspaceException;
@@ -100,7 +105,7 @@
 	List<Line> lines;
 
 	/** The matches. */
-	List<Match> matches;
+	List<? extends Match> matches;
 
 	/** The positions. */
 	int[] positions;
@@ -112,7 +117,7 @@
 	HashMap<Integer, Line> processedIdx;
 
 	/** The result. */
-	QueryResult result;
+	Selection result;
 
 	/** The symbol. */
 	private String symbol;
@@ -137,9 +142,12 @@
 
 	/** The query. */
 	@Parameter(key = ReferencerPreferences.QUERY)
-	protected CQLQuery pQuery;
+	protected IQuery pQuery;
+	
+	/** The show counts boolean. */
+	@Parameter(key = ReferencerPreferences.SHOW_COUNTS)
+	protected Boolean pShowCounts;
 
-
 	/**
 	 * Creates a not computed referencer.
 	 *
@@ -238,8 +246,9 @@
 				return false;
 			}
 		}
-		catch (CqiClientException e) {
-			e.printStackTrace();
+		catch (Exception e) {
+			Log.severe("** Error: "+e);
+			Log.printStackTrace(e);
 			return false;
 		}
 
@@ -415,7 +424,7 @@
 	 *
 	 * @return the query
 	 */
-	public CQLQuery getQuery() {
+	public IQuery getQuery() {
 		return pQuery;
 	}
 
@@ -446,10 +455,13 @@
 	 * 1st step.
 	 *
 	 * @return the query matches
-	 * @throws CqiClientException
+	 * @throws Exception 
 	 */
-	public boolean getQueryMatches() throws CqiClientException {
-		result = this.getCorpus().query(pQuery, ReferencerCoreMessages.RESULT_TYPE, false);
+	public boolean getQueryMatches() throws Exception {
+		
+		result = pQuery.getSearchEngine().query(this.getCorpus(), pQuery, "TMP", false);
+		
+//		result = this.getCorpus().query(pQuery, ReferencerCoreMessages.RESULT_TYPE, false);
 		if (result.getNMatch() == 0) {
 			return false;
 		}
@@ -501,7 +513,7 @@
 		return true;
 	}
 
-	public void setParameters(CQLQuery query, WordProperty prop, List<StructuralUnitProperty> pattern, Boolean hierarchicSort) {
+	public void setParameters(IQuery query, WordProperty prop, List<StructuralUnitProperty> pattern, Boolean hierarchicSort) {
 		if (query != null) this.pQuery = query;
 		if (pattern != null) this.pPattern = pattern;
 		if (prop != null) this.pProperty = prop;
@@ -576,7 +588,8 @@
 
 	@Override
 	public boolean loadParameters() throws CqiClientException {
-		this.pQuery = new CQLQuery(this.getStringParameterValue(ReferencerPreferences.QUERY));
+		
+		this.pQuery = IQuery.fromPrefString(this.getStringParameterValue(ReferencerPreferences.QUERY));//new CQLQuery(this.getStringParameterValue(ReferencerPreferences.QUERY));
 		this.pPattern = StructuralUnitProperty.stringToProperties(this.getCorpus(), this.getStringParameterValue(ReferencerPreferences.PATTERN));
 		this.pProperty = this.getCorpus().getProperty(this.getStringParameterValue(ReferencerPreferences.UNIT_PROPERTY));
 		return true;
@@ -584,8 +597,9 @@
 
 	@Override
 	public boolean saveParameters() {
+		
 		if (this.pQuery != null) {
-			this.saveParameter(ReferencerPreferences.QUERY, this.pQuery.getQueryString());
+			this.saveParameter(ReferencerPreferences.QUERY, IQuery.toPrefString(pQuery));
 		}
 
 		if (this.pPattern != null) {
@@ -734,7 +748,7 @@
 		}
 	}
 
-	public void setQuery(CQLQuery query) {
+	public void setQuery(Query query) {
 		this.pQuery = query;
 	}
 
@@ -779,5 +793,13 @@
 		return ReferencerCoreMessages.RESULT_TYPE;
 	}
 
+	public void setShowCounts(boolean showCounts) {
+		
+		pShowCounts = showCounts;
+	}
 
+	public boolean getShowCounts() {
+		
+		return pShowCounts;
+	}
 }
Index: tmp/org.txm.concordance.core/src/org/txm/concordance/core/functions/Concordance.java
===================================================================
--- tmp/org.txm.concordance.core/src/org/txm/concordance/core/functions/Concordance.java	(revision 3206)
+++ tmp/org.txm.concordance.core/src/org/txm/concordance/core/functions/Concordance.java	(revision 3207)
@@ -206,7 +206,7 @@
 		
 		try {
 			
-			this.setQuery(this.getStringParameterValue(ConcordancePreferences.QUERY));
+			this.pQuery = IQuery.fromPrefString(this.getStringParameterValue(ConcordancePreferences.QUERY));
 			
 			this.setCQLSeparator(this.getCorpus().getCQLLimitQuery());
 			
@@ -1807,7 +1807,7 @@
 	public boolean saveParameters() {
 		
 		if (pQuery != null) {
-			this.saveParameter(ConcordancePreferences.QUERY, pQuery.getQueryString());
+			this.saveParameter(ConcordancePreferences.QUERY, IQuery.toPrefString(pQuery));
 		}
 		
 		this.saveParameter(ConcordancePreferences.KEYWORD_VIEW_PROPERTIES, WordProperty.propertiesToString(this.pViewKeywordProperties));
Index: tmp/org.txm.index.core/src/org/txm/index/core/functions/Index.java
===================================================================
--- tmp/org.txm.index.core/src/org/txm/index/core/functions/Index.java	(revision 3206)
+++ tmp/org.txm.index.core/src/org/txm/index/core/functions/Index.java	(revision 3207)
@@ -393,7 +393,7 @@
 		this.saveParameter(TXMPreferences.UNIT_PROPERTIES, WordProperty.propertiesToString(pProperties));
 		
 		if (pQuery != null) {
-			this.saveParameter(TXMPreferences.QUERY, pQuery.getQueryString());
+			this.saveParameter(TXMPreferences.QUERY, IQuery.toPrefString(pQuery));
 		}
 		
 		return true;
@@ -402,7 +402,7 @@
 	@Override
 	public boolean loadParameters() {
 		this.pProperties = (List<WordProperty>) Property.stringToProperties(getCorpus(), this.getStringParameterValue(TXMPreferences.UNIT_PROPERTIES));
-		this.pQuery = new CQLQuery(this.getStringParameterValue(TXMPreferences.QUERY));
+		this.pQuery = IQuery.fromPrefString(this.getStringParameterValue(TXMPreferences.QUERY));//new CQLQuery(this.getStringParameterValue(TXMPreferences.QUERY));
 		return true;
 	}
 	
Index: tmp/org.txm.searchengine.core/src/org/txm/searchengine/core/IQuery.java
===================================================================
--- tmp/org.txm.searchengine.core/src/org/txm/searchengine/core/IQuery.java	(revision 3206)
+++ tmp/org.txm.searchengine.core/src/org/txm/searchengine/core/IQuery.java	(revision 3207)
@@ -1,5 +1,9 @@
 package org.txm.searchengine.core;
 
+import org.eclipse.osgi.util.NLS;
+
+import com.hp.hpl.jena.reasoner.IllegalParameterException;
+
 /**
  * Represent a search engine query
  * 
@@ -36,4 +40,33 @@
 	public boolean equals(IQuery q);
 	
 	public String asString();
+	
+	public static String toPrefString(IQuery query) {
+		return query.getSearchEngine().getName()+"\t"+query.getQueryString();
+	}
+	
+	public static IQuery fromPrefString(String prefString) {
+		
+		String[] split = prefString.split("\t", 2);
+		
+		String engineName = null;
+		String queryString = null;
+		
+		
+		if (split.length == 2) {
+			engineName = split[0];
+			queryString = split[1];
+		} else {
+			engineName = "CQP";
+			queryString = split[0];
+		}
+		
+		SearchEngine se = SearchEnginesManager.getSearchEngine(engineName);
+		if (se == null) {
+			throw new IllegalParameterException(NLS.bind("No SearchEngine {0} found.", engineName));
+		}
+		IQuery query = se.newQuery();
+		query.setQuery(queryString);
+		return query;
+	}
 }
