Skip to content
This repository has been archived by the owner on Dec 21, 2020. It is now read-only.
François Parmentier edited this page Oct 7, 2015 · 14 revisions

ezVIS FAQ

Installing ezvis is prevented by already installed visir

From version 6.0.0 to 6.0.1, ezvisir was renamed to ezvis, but we kept the visir command, in order to allow old script to continue working.

This is why npm can't install ezvis over an already installed ezvisir (or any older version).

To solve the problem, uninstall the previous application:

$ npm uninstall ezvisir -g

then install ezvis again:

$ npm install ezvis -g

Where can I find examples of configuration files?

See ezVIS showcase

Why doesn't npm stage work to install ezvis ?

According to some npm versions, bound to some node versions, it happens that the npm install -g ezvis does not work (but it's then true for any other npm module).

We encountered the case with node v0.10.3. Problem solved using version 0.10.30 (note the zero at the end).

Note: ezvis should work with version 0.11 and 0.12 too (although this last version is not yet tested). It is mostly developed using node v0.10.28).

How to install behind a proxy ?

If you are behind a proxy (let's say http://proxy.domain.org:8080/), you need to tell npm:

$ npm config set https-proxy http://proxy.domain.org:8080/
$ npm config set strict-ssl false

The documents in my file are not all loaded

When you compare the line number of your CSV and the result of http://localhost:3000/compute.json?operator=count&field=wid (in data.value), it's different.

Check that no documentField is longer than 1000 characters.

If it is the case, and you don't use it as a fields for a chart (which shouldn't be the case), add

   "noindex": true

as a property for this documentField.

A chart (or a facet) on a particular field does not display

If the name of the field is uppercase, change it to lowercase (and don't forget to modify the chart/facet settings too).

See issue #11 of castor-core.

Note: this is fixed by [email protected]

Configuration: how to put several fields of several elements from an array into a string?

From a content.json containing, at some level, an array element like:

{
 "fA14": [
  {
   "s1":{"#text": "Inst Natl Sci Appl"},
   "s2":{"#text": "GEMPPM, CNRS, UMR 5510, F-69621 Villeurbanne"},
   "s3":{"#text": "France"}
  },
  {
   "s1":{"#text": "Univ Grenoble 1"},
   "s2":{"#text": "CNRS, CERMAV, F-38041 Grenoble"},
   "s3":{"#text": "France"}
  }
 ]
}

To obtain the string: Inst Natl Sci Appl, GEMPPM, CNRS, UMR 5510, F-69621 Villeurbanne, France; Univ Grenoble 1, CNRS, CERMAV, F-38041 Grenoble, France in the documentField called completeAffiliation:

{
  "$completeAffiliation" : {
    "select" : ".fA14 :has(:root > .s1)",
    "foreach": {
      "template": "{{s1.#text}}, {{s2.#text}}, {{s3.#text}}"
    },
    "join": "; "
  }
}

How to get the error message from MongoDB

Using Windows and MongoDB as a simple executable (double-clicking on mongod.exe), it may happen that the window (looking like the command prompt) closes, and does not let MongoDB run (thus, prevents ezVIS to work).

Usually, MongoDB gives an error message, but, as you ran it in its own window, that window is closed as soon as mongod stops. To be able to read (and copy-paste) the message, you simply need to run mongod from a normal command prompt, so that the window won't close when mongo has stopped.

Once the command prompt is launched (look for it in Start menu), go to the location of the mongod.exe file (ex: cd d:\, then cd d:\mongodb\bin), and run mongod by typing its name, followed by enter.

How to unlock mongoDB

It happens that a MongoDB don't run and produce an error unexpected shutdown.

That error is cleared by the removing of the mongod.lock file, which may be located in D:\data\db if you followed the Windows installation documentation.

How to combine arrays in corpusFields and values in flyingFields?

From:

http://localhost:3000/compute.json?o=distinct&f=Year&itemsPerPage=

[
{

    "_id": "2007",
    "value": 538

},
{
    "_id": "2008",
    "value": 577
},
{
    "_id": "2009",
    "value": 611
},
{
    "_id": "2010",
    "value": 548
},
{
    "_id": "2011",
    "value": 567
},
    {
        "_id": "2012",
        "value": 608
    }
]
  "flyingFields": {
    "$getIdValue": {
	  "$i": {
	    "get": "_id"
	  },
	  "$w": {
 	    "get": "citationRatio",
		"mask": "_id,value",
		"foreach": {
		  "template": "\"{{_id}}\":{{value}}"
		},
		"join": ","
	  },
	  "$v": {
		"compute": "\"{\" + w + \"}\"",
		"parseJSON": true
	  },
	  "mask": "i,v",
	  "$tvalue": {
	    "getPropertyVar": ["v","i"]
	  },
	  "$$": {
	    "$_id": {
		  "get": "i"
		},
		"$value": {
		  "get": "tvalue"
		}
	  }
	 },

Produce:

[
{

    "i": "2007",
    "v": 
    {
        "2007": 14.276951672862454,
        "2008": 9.495667244367418,
        "2009": 8.25368248772504,
        "2010": 6.748175182481752,
        "2011": 5.162257495590829,
        "2012": 3.370065789473684
    },
    "tvalue": 14.276951672862454,
    "_id": "2007",
    "value": 14.276951672862454
},
{
    "i": "2008",
    "v": 
    {
        "2007": 14.276951672862454,
        "2008": 9.495667244367418,
        "2009": 8.25368248772504,
        "2010": 6.748175182481752,
        "2011": 5.162257495590829,
        "2012": 3.370065789473684
    },
    "tvalue": 9.495667244367418,
    "_id": "2008",
    "value": 9.495667244367418
},
{
    "i": "2009",
    "v": 
    {
        "2007": 14.276951672862454,
        "2008": 9.495667244367418,
        "2009": 8.25368248772504,
        "2010": 6.748175182481752,
        "2011": 5.162257495590829,
        "2012": 3.370065789473684
    },
    "tvalue": 8.25368248772504,
    "_id": "2009",
    "value": 8.25368248772504
},
{
    "i": "2010",
    "v": 
    {
        "2007": 14.276951672862454,
        "2008": 9.495667244367418,
        "2009": 8.25368248772504,
        "2010": 6.748175182481752,
        "2011": 5.162257495590829,
        "2012": 3.370065789473684
    },
    "tvalue": 6.748175182481752,
    "_id": "2010",
    "value": 6.748175182481752
},
{
    "i": "2011",
    "v": 
    {
        "2007": 14.276951672862454,
        "2008": 9.495667244367418,
        "2009": 8.25368248772504,
        "2010": 6.748175182481752,
        "2011": 5.162257495590829,
        "2012": 3.370065789473684
    },
    "tvalue": 5.162257495590829,
    "_id": "2011",
    "value": 5.162257495590829
},
{
    "i": "2012",
    "v": 
        {
            "2007": 14.276951672862454,
            "2008": 9.495667244367418,
            "2009": 8.25368248772504,
            "2010": 6.748175182481752,
            "2011": 5.162257495590829,
            "2012": 3.370065789473684
        },
        "tvalue": 3.370065789473684,
        "_id": "2012",
        "value": 3.370065789473684
    }
]